diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2020-09-22 15:55:28 +0300 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2020-09-22 15:55:28 +0300 |
commit | 5a8adce8c2be663ad2e6bb0a48ee8dc908ab4daa (patch) | |
tree | abbb025c5005707b519a0b62111a99c1f5105a5c | |
parent | e0f66cbba095d4a4739b414a8878b567dc930b01 (diff) | |
download | unit-5a8adce8c2be663ad2e6bb0a48ee8dc908ab4daa.tar.gz unit-5a8adce8c2be663ad2e6bb0a48ee8dc908ab4daa.tar.bz2 |
Ensure docker images are using latest versions of base OS packages.
Diffstat (limited to '')
-rw-r--r-- | pkg/docker/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index d18e2b18..aed5b8f7 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -38,7 +38,7 @@ default: @echo "valid targets: all build dockerfiles push tag export clean" dockerfiles: $(addprefix Dockerfile., $(MODULES)) -build: $(addprefix build-,$(MODULES)) +build: refresh-base $(addprefix build-,$(MODULES)) tag: $(addprefix tag-,$(MODULES)) push: $(addprefix push-,$(MODULES)) latest export: $(addsuffix .tar.gz,$(addprefix $(EXPORT_DIR)/nginx-unit-$(VERSION)-,$(MODULES))) $(addsuffix .tar.gz.sha512, $(addprefix $(EXPORT_DIR)/nginx-unit-$(VERSION)-,$(MODULES))) @@ -51,7 +51,7 @@ Dockerfile.%: ../../version > $@ build-%: Dockerfile.% - docker build -t unit:$(VERSION)-$* -f Dockerfile.$* . + docker build --no-cache -t unit:$(VERSION)-$* -f Dockerfile.$* . tag-%: build-% docker tag unit:$(VERSION)-$* nginx/unit:$(VERSION)-$* @@ -63,6 +63,9 @@ latest: docker tag nginx/unit:$(VERSION)-full nginx/unit:latest docker push nginx/unit:latest +refresh-base: + docker pull $(shell head -n 1 Dockerfile.tmpl | cut -d' ' -f 2) + $(EXPORT_DIR): mkdir -p $@ @@ -78,4 +81,4 @@ clean: rm -f $(addprefix Dockerfile., $(MODULES)) rm -rf $(EXPORT_DIR) -.PHONY: default all build dockerfiles latest push tag export clean +.PHONY: default all build dockerfiles latest push tag export clean refresh-base |