From 40a217b585f0ea9727ae7e3df3f9b0f7f1f6d5ea Mon Sep 17 00:00:00 2001 From: ducoterra Date: Tue, 2 Nov 2021 10:22:48 -0400 Subject: [PATCH] Use buildx to create multi-arch images clear and set the buildx context on push. Then use --push with buildx build to push the multi-arch images immediately after creating them. This gets around the need to store them locally (which won't work for something like an M1 mac). --- make/docker.makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/make/docker.makefile b/make/docker.makefile index dc77c21..2c40944 100644 --- a/make/docker.makefile +++ b/make/docker.makefile @@ -18,5 +18,7 @@ build: .PHONY: push push: - docker buildx build --platform linux/amd64 --push . -t $(IMAGE) - @docker buildx build --platform linux/amd64 --push . -t $(IMAGE_LATEST) + -make buildx-clear + @make buildx-context + docker buildx build --platform linux/amd64,linux/arm64 --push . -t $(IMAGE) + @docker buildx build --platform linux/amd64,linux/arm64 --push . -t $(IMAGE_LATEST)