From 90224d5fcd85d8415cda12fccb08cfca93f89eec Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 6 Jun 2016 22:59:30 -0700 Subject: [PATCH] Append to /var/log/docker.log and /var/log/system-docker.log --- images/02-console/docker-init | 2 +- trash.conf | 2 +- .../rancher/docker-from-scratch/Dockerfile | 2 +- .../docker-from-scratch/Dockerfile.dapper | 25 ++++++++----------- .../rancher/docker-from-scratch/scratch.go | 2 +- 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/images/02-console/docker-init b/images/02-console/docker-init index 4871158b..d02bc809 100755 --- a/images/02-console/docker-init +++ b/images/02-console/docker-init @@ -19,4 +19,4 @@ for i in /opt/bin /usr/local/bin; do fi done -exec /usr/bin/dockerlaunch $DOCKER_BIN "$@" $DOCKER_OPTS >/var/log/docker.log 2>&1 +exec /usr/bin/dockerlaunch $DOCKER_BIN "$@" $DOCKER_OPTS >>/var/log/docker.log 2>&1 diff --git a/trash.conf b/trash.conf index 55b445df..71f4753e 100644 --- a/trash.conf +++ b/trash.conf @@ -33,7 +33,7 @@ github.com/opencontainers/runtime-spec f955d90e70a98ddfb886bd930ffd076da9b67998 github.com/opencontainers/specs f955d90e70a98ddfb886bd930ffd076da9b67998 github.com/packethost/packngo 92012705236896736875186c9e49557897c6af90 https://github.com/ibuildthecloud/packngo.git github.com/pmezard/go-difflib d8ed2627bdf02c080bf22230dbb337003b7aba2d -github.com/rancher/docker-from-scratch v1.10.3 +github.com/rancher/docker-from-scratch 2a4ea96a0a45eac0127049a3a96b60270d0f0a8b github.com/rancher/netconf ddd7e35a6aacd7e80991920774083dd4408ec018 github.com/rcrowley/go-metrics eeba7bd0dd01ace6e690fa833b3f22aaec29af43 github.com/ryanuber/go-glob 0067a9abd927e50aed5190662702f81231413ae0 diff --git a/vendor/github.com/rancher/docker-from-scratch/Dockerfile b/vendor/github.com/rancher/docker-from-scratch/Dockerfile index 9114c2fd..37c56b45 100644 --- a/vendor/github.com/rancher/docker-from-scratch/Dockerfile +++ b/vendor/github.com/rancher/docker-from-scratch/Dockerfile @@ -2,7 +2,7 @@ FROM scratch ADD build/base-files.tar.gz / COPY build/ca-certificates.crt /usr/etc/ssl/certs/ COPY build/dockerlaunch /usr/bin/ -COPY build/docker /usr/bin/docker +COPY build/docker* /usr/bin/ VOLUME /var/lib/docker ENTRYPOINT ["/usr/bin/dockerlaunch", "/usr/bin/docker"] CMD ["daemon", "-s", "overlay"] diff --git a/vendor/github.com/rancher/docker-from-scratch/Dockerfile.dapper b/vendor/github.com/rancher/docker-from-scratch/Dockerfile.dapper index e2d5afcd..803f74d0 100644 --- a/vendor/github.com/rancher/docker-from-scratch/Dockerfile.dapper +++ b/vendor/github.com/rancher/docker-from-scratch/Dockerfile.dapper @@ -4,7 +4,7 @@ RUN apt-get update && \ apt-get -y install locales sudo vim less curl wget git rsync build-essential isolinux xorriso gccgo \ libblkid-dev libmount-dev libselinux1-dev cpio genisoimage qemu-kvm python-pip ca-certificates pkg-config tox -RUN wget -O - https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | tar -xz -C /usr/local +RUN wget -O - https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz | tar -xz -C /usr/local RUN wget -O /usr/local/bin/docker -L https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 && \ chmod +x /usr/local/bin/docker @@ -18,23 +18,18 @@ ENV DAPPER_OUTPUT "" ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_ENV NO_TEST ARCH -RUN mkdir -p ${DAPPER_SOURCE} && ln -s ${DAPPER_SOURCE} /source - -WORKDIR ${DAPPER_SOURCE} - -RUN mkdir -p assets +RUN mkdir -p ${DAPPER_SOURCE}/assets && ln -s ${DAPPER_SOURCE} /source WORKDIR ${DAPPER_SOURCE}/assets -RUN wget https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.4.0/base-files_amd64.tar.gz -RUN wget https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.4.0/base-files_arm.tar.gz -RUN wget https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.4.0/base-files_arm64.tar.gz -RUN wget -O ./docker_amd64 -L https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 && \ - chmod +x ./docker_amd64 -RUN wget -O ./docker_arm -L https://github.com/rancher/docker/releases/download/v1.10.3-arm/docker-1.10.3_arm && \ - chmod +x ./docker_arm -RUN wget -O ./docker_arm64 -L https://github.com/rancher/docker/releases/download/v1.10.3-arm/docker-1.10.3_arm64 && \ - chmod +x ./docker_arm64 +RUN wget https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.4.0/base-files_amd64.tar.gz && \ + wget https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.4.0/base-files_arm.tar.gz && \ + wget https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.4.0/base-files_arm64.tar.gz + +ENV DOCKER_VERSION=1.11.1 DOCKER_PATCH_VERSION=v1.11.1-ros4 +RUN wget -O docker-${DOCKER_VERSION}_amd64.tgz -L https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz && \ + wget -L https://github.com/rancher/docker/releases/download/${DOCKER_PATCH_VERSION}/docker-${DOCKER_VERSION}_arm.tgz && \ + wget -L https://github.com/rancher/docker/releases/download/${DOCKER_PATCH_VERSION}/docker-${DOCKER_VERSION}_arm64.tgz WORKDIR ${DAPPER_SOURCE} diff --git a/vendor/github.com/rancher/docker-from-scratch/scratch.go b/vendor/github.com/rancher/docker-from-scratch/scratch.go index 45d1be6c..82178fd2 100644 --- a/vendor/github.com/rancher/docker-from-scratch/scratch.go +++ b/vendor/github.com/rancher/docker-from-scratch/scratch.go @@ -595,7 +595,7 @@ func setupLogging(config *Config) error { return err } - output, err := os.Create(config.LogFile) + output, err := os.OpenFile(config.LogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { return err }