From 36a8134cf1f55fd5f6989ef42d1c73c5448bf0b0 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Sat, 15 Feb 2020 15:16:23 -0300 Subject: [PATCH] Cleanup build of nginx image (#5085) --- images/nginx/Makefile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/images/nginx/Makefile b/images/nginx/Makefile index e237a634e1..232fce9b33 100644 --- a/images/nginx/Makefile +++ b/images/nginx/Makefile @@ -12,6 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +.DEFAULT_GOAL:=container + +# set default shell +SHELL=/bin/bash -o pipefail + # 0.0.0 shouldn't clobber any released builds TAG ?= 0.98 REGISTRY ?= quay.io/kubernetes-ingress-controller @@ -25,34 +30,26 @@ EMPTY := SPACE := $(EMPTY) $(EMPTY) COMMA := , -.PHONY: all -all: container - .PHONY: container container: DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ - --no-cache \ --progress plain \ --platform $(subst $(SPACE),$(COMMA),$(PLATFORMS)) \ --tag $(IMAGE):$(TAG) rootfs # https://github.com/docker/buildx/issues/59 $(foreach PLATFORM,$(PLATFORMS), \ - DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ - --load \ - --progress plain \ - --platform $(PLATFORM) \ - --tag $(IMAGE)-$(PLATFORM):$(TAG) rootfs;) + DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ + --load \ + --progress plain \ + --platform $(PLATFORM) \ + --tag $(IMAGE)-$(PLATFORM):$(TAG) rootfs;) .PHONY: push push: container $(foreach PLATFORM,$(PLATFORMS), \ docker push $(IMAGE)-$(PLATFORM):$(TAG);) -ifeq ($(ARCH), amd64) - docker push $(IMAGE):$(TAG) -endif - .PHONY: release release: push echo "done"