File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,21 @@ docker-build: ## Build docker image with the manager.
107
107
docker-push : # # Push docker image with the manager.
108
108
${CONTAINER_CMD} push ${IMG}
109
109
110
+ # PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
111
+ # architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
112
+ # - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
113
+ # - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
114
+ # - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> than the export will fail)
115
+ # To properly provided solutions that supports more than one platform you should use this option.
116
+ PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
117
+ .PHONY : docker-buildx
118
+ docker-buildx : # # Build and push docker image for the manager for cross-platform support
119
+ - docker buildx create --name project-v3-builder
120
+ docker buildx use project-v3-builder
121
+ - docker buildx build --push --platform=$(PLATFORMS ) --tag ${IMG} -f Dockerfile .
122
+ - docker buildx rm project-v3-builder
123
+
124
+
110
125
# #@ Deployment
111
126
112
127
.PHONY : install
You can’t perform that action at this time.
0 commit comments