From c011bbae0c52f60f9dcd2972fc4db845744356b0 Mon Sep 17 00:00:00 2001 From: James Mills Date: Mon, 1 Aug 2022 14:03:00 +1000 Subject: [PATCH] Fix image target to build multi-arch images to the Docker Hub --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3a501dd..bab225d 100644 --- a/Makefile +++ b/Makefile @@ -54,11 +54,10 @@ install: build ## Install tube to $DESTDIR ifeq ($(PUBLISH), 1) image: generate ## Build the Docker image - @docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t $(IMAGE):$(TAG) . - @docker push $(IMAGE):$(TAG) + @docker buildx build --push --platform linux/arm64,linux/amd64 --tag $(IMAGE):$(TAG) --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" . else image: generate - @docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t $(IMAGE):$(TAG) . + @docker buildx build --platform linux/arm64,linux/amd64 --tag $(IMAGE):$(TAG) --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" . endif release: generate ## Release a new version to Gitea