From 524fdf51282ca688201db61e01e818cfcb9d89eb Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Fri, 20 Jan 2017 11:55:40 -0700 Subject: [PATCH] feat(Makefile): set docker build flags via environment variable This allows CI jobs to set the "--pull --no-cache" flags in particular. The "--rm" flag was removed since it's the default. --- .travis.yml | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23b393c..3d61dcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ services: env: # HACK(bacongobbler): make travis tests work - DEIS_REGISTRY=travis-ci/ + - DOCKER_BUILD_FLAGS="--pull --no-cache" install: - make docker-build script: diff --git a/Makefile b/Makefile index eb8a92a..8c9f6d9 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ all: docker-build docker-push # For cases where we're building from local # We also alter the RC file to set the image name. docker-build: - docker build --rm -t ${IMAGE} . + docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} . docker tag ${IMAGE} ${MUTABLE_IMAGE} test: test-style test-unit test-functional