From aff199f42fb9df902b284dc8a7081944582ddd6f Mon Sep 17 00:00:00 2001 From: Kostas Lekkas Date: Tue, 5 Jul 2016 12:57:37 +0300 Subject: [PATCH] dind: use --parse-arg to change dropbear config during build-time --- Makefile | 3 +-- tools/dind/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4a672cec5..3989cfa0d 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,7 @@ clean: -rm Dockerfile supervisor-dind: - sed -i 's/\(ENV PASSWORDLESS_DROPBEAR\).*/\1 ${PASSWORDLESS_DROPBEAR}/' tools/dind/Dockerfile - cd tools/dind && docker build $(DOCKER_HTTP_PROXY) $(DOCKER_HTTPS_PROXY) --no-cache=$(DISABLE_CACHE) -t resin/resin-supervisor-dind:$(SUPERVISOR_VERSION) . + cd tools/dind && docker build $(DOCKER_HTTP_PROXY) $(DOCKER_HTTPS_PROXY) --no-cache=$(DISABLE_CACHE) --build-arg PASSWORDLESS_DROPBEAR=$(PASSWORDLESS_DROPBEAR) -t resin/resin-supervisor-dind:$(SUPERVISOR_VERSION) . run-supervisor: supervisor-dind stop-supervisor cd tools/dind \ diff --git a/tools/dind/Dockerfile b/tools/dind/Dockerfile index cbc3add53..aee192f29 100644 --- a/tools/dind/Dockerfile +++ b/tools/dind/Dockerfile @@ -14,7 +14,7 @@ ENV DOCKER_VERSION 1.10.3 ENV RELEASE_NAME jessie # Change to 'true' to allow blank password dropbear logins on dind HostOS -ENV PASSWORDLESS_DROPBEAR false +ARG PASSWORDLESS_DROPBEAR=false COPY config/certs/ /usr/local/share/ca-certificates/ RUN rm -f /usr/local/share/ca-certificates/.keepme ; update-ca-certificates