From 00ae31cbddf7b083c35c6f5b30807ada564d83b4 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Fri, 3 Jun 2016 02:12:31 +0200 Subject: [PATCH] docker: make dockerfile differences more obvious License: MIT Signed-off-by: Lars Gierth --- Dockerfile | 2 +- test/Dockerfile => Dockerfile.fast | 4 +--- test/3nodetest/Makefile | 2 +- test/sharness/t0300-docker-image.sh | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) rename test/Dockerfile => Dockerfile.fast (94%) diff --git a/Dockerfile b/Dockerfile index b5ae6e06b..4d2803002 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.3 MAINTAINER Lars Gierth -# There is a copy of this Dockerfile in test/sharness, +# There is a copy of this Dockerfile called Dockerfile.fast, # which is optimized for build time, instead of image size. # # Please keep these two Dockerfiles in sync. diff --git a/test/Dockerfile b/Dockerfile.fast similarity index 94% rename from test/Dockerfile rename to Dockerfile.fast index 046dfb812..9713fb5b0 100644 --- a/test/Dockerfile +++ b/Dockerfile.fast @@ -1,12 +1,10 @@ FROM alpine:3.3 MAINTAINER Lars Gierth -# This is a copy of the root Dockerfile, +# This is a copy of /Dockerfile, # except that we optimize for build time, instead of image size. # # Please keep these two Dockerfiles in sync. -# -# Only sections different from the root Dockerfile are commented. EXPOSE 4001 diff --git a/test/3nodetest/Makefile b/test/3nodetest/Makefile index b769a2ee5..c4fdf18b7 100644 --- a/test/3nodetest/Makefile +++ b/test/3nodetest/Makefile @@ -25,7 +25,7 @@ bin/random: $(RANDOMSRC)/**/*.go # just build it every time... this part isn't # even the lengthy part, and it decreases pain. docker_ipfs_image: - docker build -t $(IMAGE_NAME) -f test/Dockerfile . + docker build -t $(IMAGE_NAME) -f Dockerfile.fast . docker images | grep $(IMAGE_NAME) clean: diff --git a/test/sharness/t0300-docker-image.sh b/test/sharness/t0300-docker-image.sh index 489057a5c..98998bf3a 100755 --- a/test/sharness/t0300-docker-image.sh +++ b/test/sharness/t0300-docker-image.sh @@ -33,7 +33,7 @@ TEST_TESTS_DIR=$(dirname "$TEST_SCRIPTS_DIR") APP_ROOT_DIR=$(dirname "$TEST_TESTS_DIR") test_expect_success "docker image build succeeds" ' - docker_build "$TEST_TESTS_DIR/Dockerfile" "$APP_ROOT_DIR" >actual || + docker_build "$TEST_TESTS_DIR/../Dockerfile.fast" "$APP_ROOT_DIR" >actual || test_fsh echo "TEST_TESTS_DIR: $TEST_TESTS_DIR" || test_fsh echo "APP_ROOT_DIR : $APP_ROOT_DIR" || test_fsh cat actual