From 19aafd291c29c4a1c8e0457f8b17cd339cb78686 Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Tue, 10 Jan 2017 14:29:47 -0800 Subject: [PATCH] Always --pull in docker build to ensure recent base images --- build/build-image/cross/Makefile | 2 +- build/debian-iptables/Makefile | 2 +- build/lib/release.sh | 2 +- build/pause/Makefile | 2 +- cluster/addons/addon-manager/Makefile | 2 +- cluster/addons/fluentd-elasticsearch/es-image/Makefile | 2 +- .../addons/fluentd-elasticsearch/fluentd-es-image/Makefile | 2 +- cluster/addons/fluentd-elasticsearch/kibana-image/Makefile | 2 +- cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile | 2 +- cluster/addons/python-image/Makefile | 2 +- cluster/addons/registry/images/Makefile | 2 +- cluster/images/etcd-empty-dir-cleanup/Makefile | 2 +- cluster/images/etcd/Makefile | 2 +- cluster/images/hyperkube/Makefile | 2 +- cluster/images/kube-discovery/Makefile | 2 +- cluster/images/kubemark/Makefile | 2 +- examples/cluster-dns/images/backend/Makefile | 2 +- examples/cluster-dns/images/frontend/Makefile | 2 +- examples/explorer/Makefile | 2 +- examples/guestbook-go/Makefile | 4 ++-- examples/https-nginx/Makefile | 2 +- examples/kubectl-container/Makefile | 2 +- examples/storage/cassandra/image/Makefile | 2 +- federation/cluster/common.sh | 2 +- test/e2e_node/conformance/build/Makefile | 2 +- test/images/clusterapi-tester/Makefile | 2 +- test/images/dnsutils/Makefile | 2 +- test/images/entrypoint-tester/Makefile | 2 +- test/images/fakegitserver/Makefile | 2 +- test/images/goproxy/Makefile | 2 +- test/images/hostexec/Makefile | 2 +- test/images/iperf/Makefile | 2 +- test/images/jessie-dnsutils/Makefile | 2 +- test/images/logs-generator/Makefile | 4 ++-- test/images/mount-tester-user/Makefile | 2 +- test/images/mount-tester/Makefile | 2 +- test/images/n-way-http/Makefile | 2 +- test/images/net/Makefile | 2 +- test/images/netexec/Makefile | 2 +- test/images/network-tester/Makefile | 2 +- test/images/pets/redis/Makefile | 2 +- test/images/pets/zookeeper/Makefile | 2 +- test/images/port-forward-tester/Makefile | 2 +- test/images/porter/Makefile | 2 +- test/images/resource-consumer/Makefile | 4 ++-- test/images/serve_hostname/Makefile | 2 +- test/images/volumes-tester/ceph/Makefile | 2 +- test/images/volumes-tester/gluster/Makefile | 2 +- test/images/volumes-tester/iscsi/Makefile | 2 +- test/images/volumes-tester/nfs/Makefile | 2 +- test/images/volumes-tester/rbd/Makefile | 2 +- test/soak/cauldron/Makefile | 2 +- 52 files changed, 55 insertions(+), 55 deletions(-) diff --git a/build/build-image/cross/Makefile b/build/build-image/cross/Makefile index bb760eba03..83e2c86222 100644 --- a/build/build-image/cross/Makefile +++ b/build/build-image/cross/Makefile @@ -21,7 +21,7 @@ TAG=$(shell cat VERSION) all: push build: - docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) . + docker build --pull -t gcr.io/google_containers/$(IMAGE):$(TAG) . push: build gcloud docker --server=gcr.io -- push gcr.io/google_containers/$(IMAGE):$(TAG) diff --git a/build/debian-iptables/Makefile b/build/debian-iptables/Makefile index 543cb32ede..3c16e6759f 100644 --- a/build/debian-iptables/Makefile +++ b/build/debian-iptables/Makefile @@ -56,7 +56,7 @@ else cd $(TEMP_DIR) && sed -i "s/CROSS_BUILD_//g" Dockerfile endif - docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR) + docker build --pull -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR) push: build gcloud docker -- push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) diff --git a/build/lib/release.sh b/build/lib/release.sh index b6dc998a1f..94e6c10a93 100644 --- a/build/lib/release.sh +++ b/build/lib/release.sh @@ -295,7 +295,7 @@ function kube::release::create_docker_images_for_server() { local docker_image_tag=gcr.io/google_containers/${binary_name}-${arch}:${md5_sum} fi - "${DOCKER[@]}" build -q -t "${docker_image_tag}" ${docker_build_path} >/dev/null + "${DOCKER[@]}" build --pull -q -t "${docker_image_tag}" ${docker_build_path} >/dev/null "${DOCKER[@]}" save ${docker_image_tag} > ${binary_dir}/${binary_name}.tar echo $md5_sum > ${binary_dir}/${binary_name}.docker_tag diff --git a/build/pause/Makefile b/build/pause/Makefile index 27f1e2a99d..69e92028d0 100644 --- a/build/pause/Makefile +++ b/build/pause/Makefile @@ -78,7 +78,7 @@ bin/$(BIN)-$(ARCH): $(SRCS) container: .container-$(ARCH) .container-$(ARCH): bin/$(BIN)-$(ARCH) - docker build -t $(IMAGE):$(TAG) --build-arg ARCH=$(ARCH) . + docker build --pull -t $(IMAGE):$(TAG) --build-arg ARCH=$(ARCH) . ifeq ($(ARCH),amd64) docker rmi $(LEGACY_AMD64_IMAGE):$(TAG) || true docker tag $(IMAGE):$(TAG) $(LEGACY_AMD64_IMAGE):$(TAG) diff --git a/cluster/addons/addon-manager/Makefile b/cluster/addons/addon-manager/Makefile index f909b06fad..288bbd631c 100644 --- a/cluster/addons/addon-manager/Makefile +++ b/cluster/addons/addon-manager/Makefile @@ -43,7 +43,7 @@ build: curl -sSL --retry 5 https://storage.googleapis.com/kubernetes-release/release/$(KUBECTL_VERSION)/bin/linux/$(ARCH)/kubectl > $(TEMP_DIR)/kubectl chmod +x $(TEMP_DIR)/kubectl cd $(TEMP_DIR) && sed -i.back "s|BASEIMAGE|$(BASEIMAGE)|g" Dockerfile - docker build -t $(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR) + docker build --pull -t $(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR) push: build gcloud docker -- push $(IMAGE)-$(ARCH):$(VERSION) diff --git a/cluster/addons/fluentd-elasticsearch/es-image/Makefile b/cluster/addons/fluentd-elasticsearch/es-image/Makefile index dc04e51150..d7e17b93b3 100755 --- a/cluster/addons/fluentd-elasticsearch/es-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/es-image/Makefile @@ -19,7 +19,7 @@ TAG = v2.4.1 build: elasticsearch_logging_discovery - docker build -t gcr.io/google_containers/elasticsearch:$(TAG) . + docker build --pull -t gcr.io/google_containers/elasticsearch:$(TAG) . push: gcloud docker -- push gcr.io/google_containers/elasticsearch:$(TAG) diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile index 257a2cfbe7..d8c72f1bdf 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile @@ -19,7 +19,7 @@ IMAGE = fluentd-elasticsearch TAG = 1.20 build: - docker build -t $(PREFIX)/$(IMAGE):$(TAG) . + docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) . push: gcloud docker --server=gcr.io -- push $(PREFIX)/$(IMAGE):$(TAG) diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile index 87a77796e0..c3c301b87e 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile @@ -18,7 +18,7 @@ TAG = v4.6.1 PREFIX = gcr.io/google_containers build: - docker build -t $(PREFIX)/kibana:$(TAG) . + docker build --pull -t $(PREFIX)/kibana:$(TAG) . push: gcloud docker -- push $(PREFIX)/kibana:$(TAG) diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile index 99f87e1f91..145811e275 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile @@ -29,7 +29,7 @@ PREFIX=gcr.io/google_containers TAG = 1.31 build: - docker build -t $(PREFIX)/fluentd-gcp:$(TAG) . + docker build --pull -t $(PREFIX)/fluentd-gcp:$(TAG) . push: diff --git a/cluster/addons/python-image/Makefile b/cluster/addons/python-image/Makefile index 4fa9300f22..6da4f7d3ce 100644 --- a/cluster/addons/python-image/Makefile +++ b/cluster/addons/python-image/Makefile @@ -18,7 +18,7 @@ VERSION=v1 .PHONY: build push build: - docker build -t "$(IMAGE):$(VERSION)" . + docker build --pull -t "$(IMAGE):$(VERSION)" . push: gcloud docker -- push "$(IMAGE):$(VERSION)" diff --git a/cluster/addons/registry/images/Makefile b/cluster/addons/registry/images/Makefile index 447853267c..c1b64de1c2 100644 --- a/cluster/addons/registry/images/Makefile +++ b/cluster/addons/registry/images/Makefile @@ -18,7 +18,7 @@ TAG = 0.4 REPO = gcr.io/google_containers/kube-registry-proxy build: - docker build -t $(REPO):$(TAG) . + docker build --pull -t $(REPO):$(TAG) . push: gcloud docker -- push $(REPO):$(TAG) diff --git a/cluster/images/etcd-empty-dir-cleanup/Makefile b/cluster/images/etcd-empty-dir-cleanup/Makefile index bce85ad63d..30aa201076 100644 --- a/cluster/images/etcd-empty-dir-cleanup/Makefile +++ b/cluster/images/etcd-empty-dir-cleanup/Makefile @@ -25,7 +25,7 @@ build: clean curl -L -O https://github.com/coreos/etcd/releases/download/v$(ETCD_VERSION)/etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz tar xzvf etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz cp etcd-v$(ETCD_VERSION)-linux-amd64/etcdctl . - docker build -t $(IMAGE):$(TAG) . + docker build --pull -t $(IMAGE):$(TAG) . rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz push: build diff --git a/cluster/images/etcd/Makefile b/cluster/images/etcd/Makefile index d8a68c787b..01091c4f0e 100644 --- a/cluster/images/etcd/Makefile +++ b/cluster/images/etcd/Makefile @@ -102,7 +102,7 @@ endif cd $(TEMP_DIR) && sed -i.bak 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile # And build the image - docker build -t $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(TEMP_DIR) + docker build --pull -t $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(TEMP_DIR) push: build gcloud docker -- push $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 40e7e7a2ff..2244d882d3 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -106,7 +106,7 @@ endif # Download CNI curl -sSL --retry 5 https://storage.googleapis.com/kubernetes-release/network-plugins/cni-${ARCH}-${CNI_RELEASE}.tar.gz | tar -xz -C ${TEMP_DIR}/cni-bin - docker build -t ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${TEMP_DIR} + docker build --pull -t ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${TEMP_DIR} rm -rf "${TEMP_DIR}" push: build diff --git a/cluster/images/kube-discovery/Makefile b/cluster/images/kube-discovery/Makefile index a85c7e0146..b7c0b7f32d 100644 --- a/cluster/images/kube-discovery/Makefile +++ b/cluster/images/kube-discovery/Makefile @@ -48,7 +48,7 @@ build: cp -r ./* ${TEMP_DIR} cp ../../../_output/dockerized/bin/linux/${ARCH}/kube-discovery ${TEMP_DIR} cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile - docker build -t ${REGISTRY}/kube-discovery-${ARCH}:${VERSION} ${TEMP_DIR} + docker build --pull -t ${REGISTRY}/kube-discovery-${ARCH}:${VERSION} ${TEMP_DIR} rm -rf "${TEMP_DIR}" push: build diff --git a/cluster/images/kubemark/Makefile b/cluster/images/kubemark/Makefile index 8ed1a6a9dc..48a684d7b1 100644 --- a/cluster/images/kubemark/Makefile +++ b/cluster/images/kubemark/Makefile @@ -16,7 +16,7 @@ # This makefile assumes that the kubemark binary is present in this directory. all: - docker build -t gcr.io/$(PROJECT)/kubemark . + docker build --pull -t gcr.io/$(PROJECT)/kubemark . gcloud docker -- push gcr.io/$(PROJECT)/kubemark .PHONY: all diff --git a/examples/cluster-dns/images/backend/Makefile b/examples/cluster-dns/images/backend/Makefile index 14e1bcdee5..67992ec266 100644 --- a/examples/cluster-dns/images/backend/Makefile +++ b/examples/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/examples/cluster-dns/images/frontend/Makefile b/examples/cluster-dns/images/frontend/Makefile index ae8847e3dd..2f6337545f 100644 --- a/examples/cluster-dns/images/frontend/Makefile +++ b/examples/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/examples/explorer/Makefile b/examples/explorer/Makefile index 28a3b4dd5f..35dd5bd7e7 100644 --- a/examples/explorer/Makefile +++ b/examples/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/examples/guestbook-go/Makefile b/examples/guestbook-go/Makefile index a838ca3619..9c63819ebc 100644 --- a/examples/guestbook-go/Makefile +++ b/examples/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/examples/https-nginx/Makefile b/examples/https-nginx/Makefile index 04d0e1c163..f8203dcac6 100644 --- a/examples/https-nginx/Makefile +++ b/examples/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/examples/kubectl-container/Makefile b/examples/kubectl-container/Makefile index bcdd62c1f5..ea127f1514 100644 --- a/examples/kubectl-container/Makefile +++ b/examples/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/examples/storage/cassandra/image/Makefile b/examples/storage/cassandra/image/Makefile index 7cae1f5ef6..4c992457c6 100644 --- a/examples/storage/cassandra/image/Makefile +++ b/examples/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} diff --git a/federation/cluster/common.sh b/federation/cluster/common.sh index 3d09ce7c9a..50fe601680 100644 --- a/federation/cluster/common.sh +++ b/federation/cluster/common.sh @@ -335,7 +335,7 @@ function push-federation-images { # TODO(madhusudancs): Remove this code when the new turn up mechanism work # is merged. kube::log::status "Building docker image ${docker_image_tag} from the binary" - docker build -q -t "${docker_image_tag}" ${docker_build_path} >/dev/null + docker build --pull -q -t "${docker_image_tag}" ${docker_build_path} >/dev/null rm -rf ${docker_build_path} diff --git a/test/e2e_node/conformance/build/Makefile b/test/e2e_node/conformance/build/Makefile index 5b8ec5e92f..174f2cf825 100644 --- a/test/e2e_node/conformance/build/Makefile +++ b/test/e2e_node/conformance/build/Makefile @@ -52,7 +52,7 @@ endif e2e_node.test \ ginkgo - docker build -t ${REGISTRY}/node-test-${ARCH}:${VERSION} ${TEMP_DIR} + docker build --pull -t ${REGISTRY}/node-test-${ARCH}:${VERSION} ${TEMP_DIR} push: build gcloud docker push ${REGISTRY}/node-test-${ARCH}:${VERSION} diff --git a/test/images/clusterapi-tester/Makefile b/test/images/clusterapi-tester/Makefile index 69cf416171..02a0e5616b 100644 --- a/test/images/clusterapi-tester/Makefile +++ b/test/images/clusterapi-tester/Makefile @@ -22,7 +22,7 @@ main: main.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o main ./main.go container: main - docker build -t $(PREFIX):$(TAG) . + docker build --pull -t $(PREFIX):$(TAG) . push: container gcloud docker -- push $(PREFIX):$(TAG) diff --git a/test/images/dnsutils/Makefile b/test/images/dnsutils/Makefile index f5e287f6e2..7155584f29 100644 --- a/test/images/dnsutils/Makefile +++ b/test/images/dnsutils/Makefile @@ -19,7 +19,7 @@ PREFIX ?= gcr.io/google_containers all: push image: - docker build -t $(PREFIX)/dnsutils . + docker build --pull -t $(PREFIX)/dnsutils . push: image gcloud docker -- push $(PREFIX)/dnsutils diff --git a/test/images/entrypoint-tester/Makefile b/test/images/entrypoint-tester/Makefile index 76ac870120..a15e667058 100644 --- a/test/images/entrypoint-tester/Makefile +++ b/test/images/entrypoint-tester/Makefile @@ -21,7 +21,7 @@ ep: ep.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./ep.go image: ep - sudo docker build -t $(PREFIX)/eptest:$(TAG) . + sudo docker build --pull -t $(PREFIX)/eptest:$(TAG) . push: image sudo docker push $(PREFIX)/eptest:$(TAG) diff --git a/test/images/fakegitserver/Makefile b/test/images/fakegitserver/Makefile index 2e4122a108..98b19cfb1c 100644 --- a/test/images/fakegitserver/Makefile +++ b/test/images/fakegitserver/Makefile @@ -21,7 +21,7 @@ ARCH = amd64 image: ./prepare.sh $(ARCH) - docker build -t $(PREFIX)/$(IMAGE):$(TAG) . + docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) . push: image gcloud docker -- push $(PREFIX)/$(IMAGE):$(TAG) diff --git a/test/images/goproxy/Makefile b/test/images/goproxy/Makefile index f6ef1f2365..f7408cbd95 100644 --- a/test/images/goproxy/Makefile +++ b/test/images/goproxy/Makefile @@ -21,7 +21,7 @@ goproxy: goproxy.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./goproxy.go image: goproxy - docker build -t $(PREFIX)/goproxy:$(TAG) . + docker build --pull -t $(PREFIX)/goproxy:$(TAG) . push: image gcloud docker -- push $(PREFIX)/goproxy:$(TAG) diff --git a/test/images/hostexec/Makefile b/test/images/hostexec/Makefile index 214035a54a..04b4008e4c 100644 --- a/test/images/hostexec/Makefile +++ b/test/images/hostexec/Makefile @@ -21,7 +21,7 @@ PREFIX = gcr.io/google_containers all: push image: - docker build -t $(PREFIX)/hostexec:$(TAG) . + docker build --pull -t $(PREFIX)/hostexec:$(TAG) . push: image gcloud docker -- push $(PREFIX)/hostexec:$(TAG) diff --git a/test/images/iperf/Makefile b/test/images/iperf/Makefile index b74b139294..15316ca80a 100644 --- a/test/images/iperf/Makefile +++ b/test/images/iperf/Makefile @@ -21,7 +21,7 @@ all: push container: image image: - docker build -t $(PREFIX)/${IMAGE} . # Build new image and automatically tag it as latest + docker build --pull -t $(PREFIX)/${IMAGE} . # Build new image and automatically tag it as latest docker tag $(PREFIX)/${IMAGE} $(PREFIX)/${IMAGE}:$(TAG) # Add the version tag to the latest image push: image diff --git a/test/images/jessie-dnsutils/Makefile b/test/images/jessie-dnsutils/Makefile index ba6e48143e..94c7f34bd1 100644 --- a/test/images/jessie-dnsutils/Makefile +++ b/test/images/jessie-dnsutils/Makefile @@ -19,7 +19,7 @@ PREFIX = gcr.io/google_containers all: push image: - docker build -t $(PREFIX)/jessie-dnsutils . + docker build --pull -t $(PREFIX)/jessie-dnsutils . push: image gcloud docker -- push $(PREFIX)/jessie-dnsutils diff --git a/test/images/logs-generator/Makefile b/test/images/logs-generator/Makefile index 79dc30bb2e..289d89f238 100644 --- a/test/images/logs-generator/Makefile +++ b/test/images/logs-generator/Makefile @@ -23,10 +23,10 @@ binary: go build -a --ldflags '-w' -o logs-generator . container: - docker build -t $(PREFIX)/logs-generator:$(TAG) . + docker build --pull -t $(PREFIX)/logs-generator:$(TAG) . push: gcloud docker -- push $(PREFIX)/logs-generator:$(TAG) clean: - rm -f logs-generator \ No newline at end of file + rm -f logs-generator diff --git a/test/images/mount-tester-user/Makefile b/test/images/mount-tester-user/Makefile index b15f987060..5da8201163 100644 --- a/test/images/mount-tester-user/Makefile +++ b/test/images/mount-tester-user/Makefile @@ -18,7 +18,7 @@ PREFIX = gcr.io/google_containers all: push image: - sudo docker build -t $(PREFIX)/mounttest-user:$(TAG) . + sudo docker build --pull -t $(PREFIX)/mounttest-user:$(TAG) . push: image gcloud docker -- push $(PREFIX)/mounttest-user:$(TAG) diff --git a/test/images/mount-tester/Makefile b/test/images/mount-tester/Makefile index be5fd1b19c..7b74ea0738 100644 --- a/test/images/mount-tester/Makefile +++ b/test/images/mount-tester/Makefile @@ -21,7 +21,7 @@ mt: mt.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./mt.go image: mt - sudo docker build -t $(PREFIX)/mounttest:$(TAG) . + sudo docker build --pull -t $(PREFIX)/mounttest:$(TAG) . push: image gcloud docker -- push $(PREFIX)/mounttest:$(TAG) diff --git a/test/images/n-way-http/Makefile b/test/images/n-way-http/Makefile index 207cd6ca8c..44d0bca79f 100644 --- a/test/images/n-way-http/Makefile +++ b/test/images/n-way-http/Makefile @@ -22,7 +22,7 @@ server: server.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go container: server - docker build -t $(PREFIX):$(TAG) . + docker build --pull -t $(PREFIX):$(TAG) . push: container gcloud docker -- push $(PREFIX):$(TAG) diff --git a/test/images/net/Makefile b/test/images/net/Makefile index 8be371d8cc..930a05da8f 100644 --- a/test/images/net/Makefile +++ b/test/images/net/Makefile @@ -25,7 +25,7 @@ net: $(SRCS) CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' image: test net - docker build -t $(PREFIX)/$(IMAGE):$(TAG) . + docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) . push: image gcloud docker -- push $(PREFIX)/$(IMAGE):$(TAG) diff --git a/test/images/netexec/Makefile b/test/images/netexec/Makefile index c699e05079..57dd2995f2 100644 --- a/test/images/netexec/Makefile +++ b/test/images/netexec/Makefile @@ -24,7 +24,7 @@ netexec: netexec.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./netexec.go image: netexec - docker build -t $(PREFIX)/netexec:$(TAG) . + docker build --pull -t $(PREFIX)/netexec:$(TAG) . push: image gcloud docker -- push $(PREFIX)/netexec:$(TAG) diff --git a/test/images/network-tester/Makefile b/test/images/network-tester/Makefile index 62abcede4f..7afdb2117f 100644 --- a/test/images/network-tester/Makefile +++ b/test/images/network-tester/Makefile @@ -23,7 +23,7 @@ webserver: webserver.go container: image image: webserver - docker build -t $(PREFIX)/nettest:$(TAG) . + docker build --pull -t $(PREFIX)/nettest:$(TAG) . push: image gcloud docker -- push $(PREFIX)/nettest:$(TAG) diff --git a/test/images/pets/redis/Makefile b/test/images/pets/redis/Makefile index 277fdb66fe..edf42c18b0 100644 --- a/test/images/pets/redis/Makefile +++ b/test/images/pets/redis/Makefile @@ -18,7 +18,7 @@ TAG = e2e PREFIX = gcr.io/google_containers/redis-install-3.2.0 container: - docker build -t $(PREFIX):$(TAG) . + docker build --pull -t $(PREFIX):$(TAG) . push: container gcloud docker -- push $(PREFIX):$(TAG) diff --git a/test/images/pets/zookeeper/Makefile b/test/images/pets/zookeeper/Makefile index 83b72c6ba3..410cad57a1 100644 --- a/test/images/pets/zookeeper/Makefile +++ b/test/images/pets/zookeeper/Makefile @@ -18,7 +18,7 @@ TAG = e2e PREFIX = gcr.io/google_containers/zookeeper-install-3.5.0-alpha container: - docker build -t $(PREFIX):$(TAG) . + docker build --pull -t $(PREFIX):$(TAG) . push: container gcloud docker -- push $(PREFIX):$(TAG) diff --git a/test/images/port-forward-tester/Makefile b/test/images/port-forward-tester/Makefile index 4bcac25e25..43ec315a3c 100644 --- a/test/images/port-forward-tester/Makefile +++ b/test/images/port-forward-tester/Makefile @@ -21,7 +21,7 @@ portforwardtester: portforwardtester.go CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./portforwardtester.go image: portforwardtester - docker build -t $(PREFIX)/portforwardtester:$(TAG) . + docker build --pull -t $(PREFIX)/portforwardtester:$(TAG) . push: image gcloud docker -- push $(PREFIX)/portforwardtester:$(TAG) diff --git a/test/images/porter/Makefile b/test/images/porter/Makefile index fc1fe4c198..7bda806b9e 100644 --- a/test/images/porter/Makefile +++ b/test/images/porter/Makefile @@ -37,7 +37,7 @@ container: image image: $(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion)) - docker build -t $(PREFIX)/porter:$(TAG) . + docker build --pull -t $(PREFIX)/porter:$(TAG) . push: $(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion)) diff --git a/test/images/resource-consumer/Makefile b/test/images/resource-consumer/Makefile index c186843a14..429a3d8875 100644 --- a/test/images/resource-consumer/Makefile +++ b/test/images/resource-consumer/Makefile @@ -25,8 +25,8 @@ consumer: container: image image: - sudo docker build -t $(PREFIX)/resource_consumer:$(TAG) . - sudo docker build -t $(PREFIX)/resource_consumer/controller:$(TAG) controller + sudo docker build --pull -t $(PREFIX)/resource_consumer:$(TAG) . + sudo docker build --pull -t $(PREFIX)/resource_consumer/controller:$(TAG) controller run_container: docker run --publish=8080:8080 $(PREFIX)/resource_consumer:$(TAG) diff --git a/test/images/serve_hostname/Makefile b/test/images/serve_hostname/Makefile index 3b30203e53..a7b9733acc 100644 --- a/test/images/serve_hostname/Makefile +++ b/test/images/serve_hostname/Makefile @@ -86,7 +86,7 @@ container: .container-$(ARCH) # Set the base image cd $(TEMP_DIR) && sed -i.bak 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile - docker build -t $(IMAGE):$(TAG) $(TEMP_DIR) + docker build --pull -t $(IMAGE):$(TAG) $(TEMP_DIR) if [ -n "$(TEST_REGISTRY)" ]; then \ docker tag $(IMAGE):$(TAG) $(TEST_IMAGE):$(TAG) ;\ fi diff --git a/test/images/volumes-tester/ceph/Makefile b/test/images/volumes-tester/ceph/Makefile index 16c47d3259..2883aafb64 100644 --- a/test/images/volumes-tester/ceph/Makefile +++ b/test/images/volumes-tester/ceph/Makefile @@ -20,7 +20,7 @@ all: push container: image image: - docker build -t $(PREFIX)/volume-ceph . # Build new image and automatically tag it as latest + docker build --pull -t $(PREFIX)/volume-ceph . # Build new image and automatically tag it as latest docker tag $(PREFIX)/volume-ceph $(PREFIX)/volume-ceph:$(TAG) # Add the version tag to the latest image push: image diff --git a/test/images/volumes-tester/gluster/Makefile b/test/images/volumes-tester/gluster/Makefile index 3537350139..4aa5b11351 100644 --- a/test/images/volumes-tester/gluster/Makefile +++ b/test/images/volumes-tester/gluster/Makefile @@ -20,7 +20,7 @@ all: push container: image image: - docker build -t $(PREFIX)/volume-gluster . # Build new image and automatically tag it as latest + docker build --pull -t $(PREFIX)/volume-gluster . # Build new image and automatically tag it as latest docker tag $(PREFIX)/volume-gluster $(PREFIX)/volume-gluster:$(TAG) # Add the version tag to the latest image push: image diff --git a/test/images/volumes-tester/iscsi/Makefile b/test/images/volumes-tester/iscsi/Makefile index efe128432f..dd830d4fd2 100644 --- a/test/images/volumes-tester/iscsi/Makefile +++ b/test/images/volumes-tester/iscsi/Makefile @@ -21,7 +21,7 @@ container: image image: # Build new image and automatically tag it as latest - docker build -t $(PREFIX)/volume-iscsi . + docker build --pull -t $(PREFIX)/volume-iscsi . # Add the version tag to the latest image docker tag $(PREFIX)/volume-iscsi $(PREFIX)/volume-iscsi:$(TAG) diff --git a/test/images/volumes-tester/nfs/Makefile b/test/images/volumes-tester/nfs/Makefile index bb4ac1c74f..1e53b19c8b 100644 --- a/test/images/volumes-tester/nfs/Makefile +++ b/test/images/volumes-tester/nfs/Makefile @@ -20,7 +20,7 @@ all: push container: image image: - docker build -t $(PREFIX)/volume-nfs . # Build new image and automatically tag it as latest + docker build --pull -t $(PREFIX)/volume-nfs . # Build new image and automatically tag it as latest docker tag $(PREFIX)/volume-nfs $(PREFIX)/volume-nfs:$(TAG) # Add the version tag to the latest image push: image diff --git a/test/images/volumes-tester/rbd/Makefile b/test/images/volumes-tester/rbd/Makefile index 4337923751..dcf3c69f37 100644 --- a/test/images/volumes-tester/rbd/Makefile +++ b/test/images/volumes-tester/rbd/Makefile @@ -21,7 +21,7 @@ container: image image: # Build new image and automatically tag it as latest - docker build -t $(PREFIX)/volume-rbd . + docker build --pull -t $(PREFIX)/volume-rbd . # Add the version tag to the latest image docker tag $(PREFIX)/volume-rbd $(PREFIX)/volume-rbd:$(TAG) diff --git a/test/soak/cauldron/Makefile b/test/soak/cauldron/Makefile index 25084c2112..3c335c9e76 100644 --- a/test/soak/cauldron/Makefile +++ b/test/soak/cauldron/Makefile @@ -20,7 +20,7 @@ cauldron: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' cauldron.go container: cauldron - docker build -t kubernetes/cauldron:$(TAG) . + docker build --pull -t kubernetes/cauldron:$(TAG) . push: docker push kubernetes/cauldron:$(TAG)