diff --git a/cluster-dns/images/backend/Makefile b/cluster-dns/images/backend/Makefile index 14e1bcde..67992ec2 100644 --- a/cluster-dns/images/backend/Makefile +++ b/cluster-dns/images/backend/Makefile @@ -19,7 +19,7 @@ IMAGE = example-dns-backend all: push image: - docker build -t $(PREFIX)/$(IMAGE):$(TAG) . + docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) . push: image gcloud docker -- push $(PREFIX)/$(IMAGE) diff --git a/cluster-dns/images/frontend/Makefile b/cluster-dns/images/frontend/Makefile index ae8847e3..2f633754 100644 --- a/cluster-dns/images/frontend/Makefile +++ b/cluster-dns/images/frontend/Makefile @@ -19,7 +19,7 @@ IMAGE = example-dns-frontend all: push image: - docker build -t $(PREFIX)/$(IMAGE):$(TAG) . + docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) . push: image gcloud docker -- push $(PREFIX)/$(IMAGE) diff --git a/explorer/Makefile b/explorer/Makefile index 28a3b4dd..35dd5bd7 100644 --- a/explorer/Makefile +++ b/explorer/Makefile @@ -21,7 +21,7 @@ explorer: explorer.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./explorer.go container: explorer - docker build -t gcr.io/google_containers/explorer:$(TAG) . + docker build --pull -t gcr.io/google_containers/explorer:$(TAG) . push: container gcloud docker -- push gcr.io/google_containers/explorer:$(TAG) diff --git a/guestbook-go/Makefile b/guestbook-go/Makefile index a838ca36..9c63819e 100644 --- a/guestbook-go/Makefile +++ b/guestbook-go/Makefile @@ -24,8 +24,8 @@ release: clean build push clean # builds a docker image that builds the app and packages it into a minimal docker image build: @cp ../../bazel-bin/examples/guestbook-go/guestbook-go guestbook_bin - docker build --rm --force-rm -t ${REGISTRY}/guestbook-builder . - docker run --rm ${REGISTRY}/guestbook-builder | docker build -t "${REGISTRY}/guestbook:${VERSION}" - + docker build --pull --rm --force-rm -t ${REGISTRY}/guestbook-builder . + docker run --rm ${REGISTRY}/guestbook-builder | docker build --pull -t "${REGISTRY}/guestbook:${VERSION}" - # push the image to an registry push: diff --git a/https-nginx/Makefile b/https-nginx/Makefile index 04d0e1c1..f8203dca 100644 --- a/https-nginx/Makefile +++ b/https-nginx/Makefile @@ -28,7 +28,7 @@ secret: go run make_secret.go -crt $(CERT) -key $(KEY) > $(SECRET) container: - docker build -t $(PREFIX):$(TAG) . + docker build --pull -t $(PREFIX):$(TAG) . push: container docker push $(PREFIX):$(TAG) diff --git a/kubectl-container/Makefile b/kubectl-container/Makefile index bcdd62c1..ea127f15 100644 --- a/kubectl-container/Makefile +++ b/kubectl-container/Makefile @@ -37,7 +37,7 @@ tag: .tag container: $(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion)) - docker build -t gcr.io/google_containers/kubectl:$(TAG) . + docker build --pull -t gcr.io/google_containers/kubectl:$(TAG) . push: container $(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion)) diff --git a/storage/cassandra/image/Makefile b/storage/cassandra/image/Makefile index 7cae1f5e..4c992457 100644 --- a/storage/cassandra/image/Makefile +++ b/storage/cassandra/image/Makefile @@ -26,7 +26,7 @@ kubernetes-cassandra.jar: ../java/* ../java/src/main/java/io/k8s/cassandra/*.jav cd ../java && mvn clean build: kubernetes-cassandra.jar - docker build -t ${PROJECT}/cassandra:${VERSION} . + docker build --pull -t ${PROJECT}/cassandra:${VERSION} . push: build gcloud docker -- push ${PROJECT}/cassandra:${VERSION}