From 7c5f8fbc63616ee3500f4523c00d285f46c7f81d Mon Sep 17 00:00:00 2001 From: Olivier Bornet Date: Thu, 28 Oct 2021 09:31:53 +0200 Subject: [PATCH] Rename ARGS to DOCKER_BUILD_ARGS Better naming of this, as it's arguments of the docker build phase. --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 5c83c7b1..4a8f799b 100644 --- a/Makefile +++ b/Makefile @@ -48,10 +48,10 @@ help: -build/%: ARGS?= +build/%: DOCKER_BUILD_ARGS?= build/%: ## build the latest image for a stack using the system's architecture @echo "::group::Build $(OWNER)/$(notdir $@) (system's architecture)" - docker build $(ARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) + docker build $(DOCKER_BUILD_ARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) @echo -n "Built image size: " @docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}" @echo "::endgroup::" @@ -97,16 +97,16 @@ build-all: $(foreach I, $(ALL_IMAGES), build/$(I)) ## build all stacks # without needing to update this Makefile, and if all tests succeeds we can # do a publish job that creates a multi-platform image for us. # -build/%: ARGS?= +build/%: DOCKER_BUILD_ARGS?= build-multi/%: ## build the latest image for a stack on both amd64 and arm64 @echo "::group::Build $(OWNER)/$(notdir $@) (system's architecture)" - docker buildx build $(ARGS) -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) --load + docker buildx build $(DOCKER_BUILD_ARGS) -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) --load @echo -n "Built image size: " @docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}" @echo "::endgroup::" @echo "::group::Build $(OWNER)/$(notdir $@) (amd64,arm64)" - docker buildx build $(ARGS) -t build-multi-tmp-cache/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) --platform "linux/amd64,linux/arm64" + docker buildx build $(DOCKER_BUILD_ARGS) -t build-multi-tmp-cache/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) --platform "linux/amd64,linux/arm64" @echo "::endgroup::" build-all-multi: $(foreach I, $(MULTI_IMAGES), build-multi/$(I)) $(foreach I, $(AMD64_ONLY_IMAGES), build/$(I)) ## build all stacks @@ -183,10 +183,10 @@ push/%: ## push all tags for a jupyter image @echo "::endgroup::" push-all: $(foreach I, $(ALL_IMAGES), push/$(I)) ## push all tagged images -push-multi/%: ARGS?= +push-multi/%: DOCKER_BUILD_ARGS?= push-multi/%: ## push all tags for a jupyter image that support multiple architectures @echo "::group::Push $(OWNER)/$(notdir $@) (amd64,arm64)" - docker buildx build $(ARGS) $($(subst -,_,$(notdir $@))_EXTRA_TAG_ARGS) -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) --platform "linux/amd64,linux/arm64" --push + docker buildx build $(DOCKER_BUILD_ARGS) $($(subst -,_,$(notdir $@))_EXTRA_TAG_ARGS) -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) --build-arg OWNER=$(OWNER) --platform "linux/amd64,linux/arm64" --push @echo "::endgroup::" push-all-multi: $(foreach I, $(MULTI_IMAGES), push-multi/$(I)) $(foreach I, $(AMD64_ONLY_IMAGES), push/$(I)) ## push all tagged images