From 49a45d80f26ceb963a00428522ff485fd9f9afdc Mon Sep 17 00:00:00 2001 From: unclejack Date: Wed, 20 Jan 2016 20:05:37 +0200 Subject: [PATCH 1/2] Dockerfile,contrib,hack: remove buildpack-deps Signed-off-by: Cristian Staretu --- Dockerfile | 1 + hack/make/.ensure-frozen-images | 1 + hack/make/.ensure-syscall-test | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 45486db4ec..882e25997c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -211,6 +211,7 @@ RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker # Get useful and necessary Hub images so we can "docker load" locally instead of pulling COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ + alpine:latest@sha256:14f89d0e62577f42622f994da6b1b47159d95516d24ba050952e517b915a41f8 \ buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd5599a9523882c6dfc567f2e9ef7cf6f79db6 \ busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 \ debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e \ diff --git a/hack/make/.ensure-frozen-images b/hack/make/.ensure-frozen-images index 9eaa7f3a4d..59b805c991 100644 --- a/hack/make/.ensure-frozen-images +++ b/hack/make/.ensure-frozen-images @@ -4,6 +4,7 @@ set -e # image list should match what's in the Dockerfile (minus the explicit images IDs) images=( buildpack-deps:jessie + alpine:latest busybox:latest debian:jessie hello-world:latest diff --git a/hack/make/.ensure-syscall-test b/hack/make/.ensure-syscall-test index 20fe2dc4c2..7975933655 100644 --- a/hack/make/.ensure-syscall-test +++ b/hack/make/.ensure-syscall-test @@ -4,5 +4,20 @@ set -e # Build a C binary for cloning a userns for seccomp tests # and compile it for target daemon if [ "$DOCKER_ENGINE_GOOS" = "linux" ]; then - docker build ${DOCKER_BUILD_ARGS} -qt syscall-test contrib/syscall-test > /dev/null + if [ "$DOCKER_ENGINE_OSARCH" = "$DOCKER_CLIENT_OSARCH" ]; then + tmpdir=$(mktemp -d) + gcc -g -Wall -static contrib/syscall-test/userns.c -o "${tmpdir}/userns-test" + gcc -g -Wall -static contrib/syscall-test/ns.c -o "${tmpdir}/ns-test" + gcc -g -Wall -static contrib/syscall-test/acct.c -o "${tmpdir}/acct-test" + + dockerfile="${tmpdir}/Dockerfile" + cat <<-EOF > "$dockerfile" + FROM alpine + COPY . /usr/bin/ + EOF + docker build --force-rm ${DOCKER_BUILD_ARGS} -qt syscall-test "${tmpdir}" > /dev/null + rm -rf "${tmpdir}" + else + docker build ${DOCKER_BUILD_ARGS} -qt syscall-test contrib/syscall-test > /dev/null + fi fi From 7c9e9afeb78ad3265c2ec5d4c6969c0d6182af2b Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Tue, 9 Feb 2016 13:13:38 -0500 Subject: [PATCH 2/2] use debian:jessie for ensure-syscall-test Signed-off-by: Brian Goff --- Dockerfile | 1 - hack/make/.ensure-frozen-images | 1 - hack/make/.ensure-syscall-test | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 882e25997c..45486db4ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -211,7 +211,6 @@ RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker # Get useful and necessary Hub images so we can "docker load" locally instead of pulling COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ - alpine:latest@sha256:14f89d0e62577f42622f994da6b1b47159d95516d24ba050952e517b915a41f8 \ buildpack-deps:jessie@sha256:25785f89240fbcdd8a74bdaf30dd5599a9523882c6dfc567f2e9ef7cf6f79db6 \ busybox:latest@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 \ debian:jessie@sha256:f968f10b4b523737e253a97eac59b0d1420b5c19b69928d35801a6373ffe330e \ diff --git a/hack/make/.ensure-frozen-images b/hack/make/.ensure-frozen-images index 59b805c991..9eaa7f3a4d 100644 --- a/hack/make/.ensure-frozen-images +++ b/hack/make/.ensure-frozen-images @@ -4,7 +4,6 @@ set -e # image list should match what's in the Dockerfile (minus the explicit images IDs) images=( buildpack-deps:jessie - alpine:latest busybox:latest debian:jessie hello-world:latest diff --git a/hack/make/.ensure-syscall-test b/hack/make/.ensure-syscall-test index 7975933655..376fef1cf0 100644 --- a/hack/make/.ensure-syscall-test +++ b/hack/make/.ensure-syscall-test @@ -12,7 +12,7 @@ if [ "$DOCKER_ENGINE_GOOS" = "linux" ]; then dockerfile="${tmpdir}/Dockerfile" cat <<-EOF > "$dockerfile" - FROM alpine + FROM debian:jessie COPY . /usr/bin/ EOF docker build --force-rm ${DOCKER_BUILD_ARGS} -qt syscall-test "${tmpdir}" > /dev/null