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).
This commit is contained in:
ducoterra
2021-11-02 10:22:48 -04:00
parent 5e2bc5f872
commit 40a217b585

View File

@@ -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)