Always --pull in docker build to ensure recent base images

This commit is contained in:
Jeff Grafton
2017-01-10 14:29:47 -08:00
parent add3a08a6d
commit 19aafd291c
52 changed files with 55 additions and 55 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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:

View File

@@ -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)

View File

@@ -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))

View File

@@ -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}