diff --git a/Makefile b/Makefile index 418e7a7..11305ec 100644 --- a/Makefile +++ b/Makefile @@ -15,5 +15,16 @@ docker-build: docker-push: $(CONTAINER_TOOL) push $(REGISTRY)/$(ORG)/$(REPO):$(TAG) +.PHONY: docker-push-multiplatform +docker-push-multiplatform: + docker buildx build \ + --platform=linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/386 \ + --tag $(REGISTRY)/$(ORG)/$(REPO):$(TAG) \ + -o type=image \ + --provenance=false \ + -f Dockerfile \ + --push \ + . + load-kind: docker-build - kind load docker-image $(REGISTRY)/$(ORG)/$(REPO):$(TAG) --name=$(KIND_CLUSTER_NAME); \ No newline at end of file + kind load docker-image $(REGISTRY)/$(ORG)/$(REPO):$(TAG) --name=$(KIND_CLUSTER_NAME); diff --git a/README.md b/README.md index 6851564..092eeca 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,13 @@ TAG=1.0 make docker-push; ``` make kind-load -``` \ No newline at end of file +``` + +## Multi-platform build + +``` +docker buildx create --use --name=qemu +docker buildx inspect --bootstrap + +TAG=1.2 make docker-build-multi-platform; +```