|
|
|
@ -28,8 +28,10 @@
|
|
|
|
|
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
|
|
|
|
|
# To properly provided solutions that supports more than one platform you should use this option.
|
|
|
|
|
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
|
|
|
|
|
|
|
|
|
|
## Build and push docker image for the manager for cross-platform support
|
|
|
|
|
.PHONY: docker-buildx
|
|
|
|
|
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
|
|
|
|
|
docker-buildx:
|
|
|
|
|
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
|
|
|
|
|
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
|
|
|
|
|
- docker buildx create --name project-v3-builder
|
|
|
|
|