Rename ARGS to DOCKER_BUILD_ARGS

Better naming of this, as it's arguments of the docker build phase.
This commit is contained in:
Olivier Bornet
2021-10-28 09:31:53 +02:00
parent e25f68dbd1
commit 7c5f8fbc63

View File

@@ -48,10 +48,10 @@ help:
build/%: ARGS?= build/%: DOCKER_BUILD_ARGS?=
build/%: ## build the latest image for a stack using the system's architecture build/%: ## build the latest image for a stack using the system's architecture
@echo "::group::Build $(OWNER)/$(notdir $@) (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: " @echo -n "Built image size: "
@docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}" @docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}"
@echo "::endgroup::" @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 # 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. # 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 build-multi/%: ## build the latest image for a stack on both amd64 and arm64
@echo "::group::Build $(OWNER)/$(notdir $@) (system's architecture)" @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: " @echo -n "Built image size: "
@docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}" @docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}"
@echo "::endgroup::" @echo "::endgroup::"
@echo "::group::Build $(OWNER)/$(notdir $@) (amd64,arm64)" @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::" @echo "::endgroup::"
build-all-multi: $(foreach I, $(MULTI_IMAGES), build-multi/$(I)) $(foreach I, $(AMD64_ONLY_IMAGES), build/$(I)) ## build all stacks 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::" @echo "::endgroup::"
push-all: $(foreach I, $(ALL_IMAGES), push/$(I)) ## push all tagged images 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 push-multi/%: ## push all tags for a jupyter image that support multiple architectures
@echo "::group::Push $(OWNER)/$(notdir $@) (amd64,arm64)" @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::" @echo "::endgroup::"
push-all-multi: $(foreach I, $(MULTI_IMAGES), push-multi/$(I)) $(foreach I, $(AMD64_ONLY_IMAGES), push/$(I)) ## push all tagged images push-all-multi: $(foreach I, $(MULTI_IMAGES), push-multi/$(I)) $(foreach I, $(AMD64_ONLY_IMAGES), push/$(I)) ## push all tagged images