Always --pull in docker build to ensure recent base images
This commit is contained in:
parent
ad9e39db57
commit
47b8002971
|
|
@ -19,7 +19,7 @@ IMAGE = example-dns-backend
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
image:
|
image:
|
||||||
docker build -t $(PREFIX)/$(IMAGE):$(TAG) .
|
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
gcloud docker -- push $(PREFIX)/$(IMAGE)
|
gcloud docker -- push $(PREFIX)/$(IMAGE)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ IMAGE = example-dns-frontend
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
image:
|
image:
|
||||||
docker build -t $(PREFIX)/$(IMAGE):$(TAG) .
|
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
gcloud docker -- push $(PREFIX)/$(IMAGE)
|
gcloud docker -- push $(PREFIX)/$(IMAGE)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ explorer: explorer.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./explorer.go
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./explorer.go
|
||||||
|
|
||||||
container: explorer
|
container: explorer
|
||||||
docker build -t gcr.io/google_containers/explorer:$(TAG) .
|
docker build --pull -t gcr.io/google_containers/explorer:$(TAG) .
|
||||||
|
|
||||||
push: container
|
push: container
|
||||||
gcloud docker -- push gcr.io/google_containers/explorer:$(TAG)
|
gcloud docker -- push gcr.io/google_containers/explorer:$(TAG)
|
||||||
|
|
|
||||||
|
|
@ -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
|
# builds a docker image that builds the app and packages it into a minimal docker image
|
||||||
build:
|
build:
|
||||||
@cp ../../bazel-bin/examples/guestbook-go/guestbook-go guestbook_bin
|
@cp ../../bazel-bin/examples/guestbook-go/guestbook-go guestbook_bin
|
||||||
docker build --rm --force-rm -t ${REGISTRY}/guestbook-builder .
|
docker build --pull --rm --force-rm -t ${REGISTRY}/guestbook-builder .
|
||||||
docker run --rm ${REGISTRY}/guestbook-builder | docker build -t "${REGISTRY}/guestbook:${VERSION}" -
|
docker run --rm ${REGISTRY}/guestbook-builder | docker build --pull -t "${REGISTRY}/guestbook:${VERSION}" -
|
||||||
|
|
||||||
# push the image to an registry
|
# push the image to an registry
|
||||||
push:
|
push:
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ secret:
|
||||||
go run make_secret.go -crt $(CERT) -key $(KEY) > $(SECRET)
|
go run make_secret.go -crt $(CERT) -key $(KEY) > $(SECRET)
|
||||||
|
|
||||||
container:
|
container:
|
||||||
docker build -t $(PREFIX):$(TAG) .
|
docker build --pull -t $(PREFIX):$(TAG) .
|
||||||
|
|
||||||
push: container
|
push: container
|
||||||
docker push $(PREFIX):$(TAG)
|
docker push $(PREFIX):$(TAG)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ tag: .tag
|
||||||
|
|
||||||
container:
|
container:
|
||||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion))
|
$(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
|
push: container
|
||||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion))
|
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' to see a suggestion))
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ kubernetes-cassandra.jar: ../java/* ../java/src/main/java/io/k8s/cassandra/*.jav
|
||||||
cd ../java && mvn clean
|
cd ../java && mvn clean
|
||||||
|
|
||||||
build: kubernetes-cassandra.jar
|
build: kubernetes-cassandra.jar
|
||||||
docker build -t ${PROJECT}/cassandra:${VERSION} .
|
docker build --pull -t ${PROJECT}/cassandra:${VERSION} .
|
||||||
|
|
||||||
push: build
|
push: build
|
||||||
gcloud docker -- push ${PROJECT}/cassandra:${VERSION}
|
gcloud docker -- push ${PROJECT}/cassandra:${VERSION}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue