From d85e6bd61b51e69ed60fc8a81cb88368015ca294 Mon Sep 17 00:00:00 2001 From: jan grant <3430517+jan-g@users.noreply.github.com> Date: Fri, 19 Jan 2018 18:02:25 +0000 Subject: [PATCH] Ensure we have the latest fnproject/dind (#687) If we need to reissue fnproject/dind:17.12 (which fnproject/fnserver is based upon) then let's make sure we're using the latest one when cutting a release. To ensure we don't accidentally use stale images lying around in the docker cache (there probably shouldn't be *any*), call make clear-images before running the build. --- .circleci/config.yml | 1 + Makefile | 8 ++++++++ images/dind/preentry.sh | 13 ++++--------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e487e396..265b7e4d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,6 +29,7 @@ jobs: #docker version - run: docker version - run: nproc + - run: make clear-images - run: make full-test -j $(nproc) - deploy: command: | diff --git a/Makefile b/Makefile index 53087393d..f5719359d 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,14 @@ install: checkfmt: ./go-fmt.sh +clear-images: + -docker images -q -f dangling=true | xargs docker rmi -f + for i in fnproject/fn-test-utils fnproject/hello fnproject/error fnproject/sleeper fnproject/error \ + fnproject/dind fnproject/fnserver fnproject/fnlb; do \ + docker images "$$i" --format '{{ .ID }}\t{{ .Repository }}\t{{ .Tag}}' | while read id repo tag; do \ + if [ "$$tag" = "" ]; then docker rmi "$$id"; else docker rmi "$$repo:$$tag"; fi; done; done + + fn-test-utils: checkfmt cd images/fn-test-utils && ./build.sh diff --git a/images/dind/preentry.sh b/images/dind/preentry.sh index dddb35f31..405ba7065 100755 --- a/images/dind/preentry.sh +++ b/images/dind/preentry.sh @@ -6,16 +6,11 @@ if [ $fsdriver == "overlay" ]; then fsdriver="overlay2" fi -mkdir -p /etc/docker -/bin/cat > /etc/docker/daemon.json <