Skip to content

Commit fc63fe4

Browse files
authored
Merge pull request #129 from mboersma/build-no-cache
feat(Makefile): set docker build flags via environment variable
2 parents 550d5ae + 30d2caa commit fc63fe4

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ branches:
66
- master
77
services:
88
- docker
9+
env:
10+
- DOCKER_BUILD_FLAGS="--pull --no-cache"
911
sudo: required
1012
script:
1113
- make bootstrap docker-build test

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ build:
2828
@echo Nothing to do.
2929

3030
docker-build:
31-
docker build --pull --rm -t ${IMAGE} rootfs
31+
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
3232
docker tag ${IMAGE} ${MUTABLE_IMAGE}
3333

3434
deploy: docker-build docker-push

versioning.mk

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
MUTABLE_VERSION ?= canary
22
VERSION ?= git-$(shell git rev-parse --short HEAD)
3+
DOCKER_BUILD_FLAGS ?= --pull
34

45
IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${VERSION}
56
MUTABLE_IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}

0 commit comments

Comments
 (0)