Skip to content

Commit 98796f8

Browse files
committed
feat(Makefile): set docker build flags via environment variable
1 parent 299a3b1 commit 98796f8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bootstrap:
2121
@echo Nothing to do.
2222

2323
docker-build:
24-
docker build --pull --rm -t ${IMAGE} rootfs
24+
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
2525
docker tag ${IMAGE} ${MUTABLE_IMAGE}
2626

2727
deploy: docker-build docker-push kube-pod
@@ -48,7 +48,7 @@ kube-mc:
4848
kubectl create -f manifests/deis-mc-pod.yaml
4949

5050
mc:
51-
docker build -t ${DEIS_REGISTRY}/deis/minio-mc:latest mc
51+
docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}/deis/minio-mc:latest mc
5252
docker push ${DEIS_REGISTRY}/deis/minio-mc:latest
5353
perl -pi -e "s|image: [a-z0-9.:]+\/|image: ${DEIS_REGISTRY}/|g" manifests/deis-mc-pod.yaml
5454

versioning.mk

Lines changed: 1 addition & 0 deletions
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)