Skip to content

Commit 3bd7f13

Browse files
committed
mend
Signed-off-by: Kristian Da Costa Menezes <[email protected]>
1 parent 77e9184 commit 3bd7f13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,18 @@ docker-push: ## Push docker image with the manager.
189189
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
190190
.PHONY: docker-buildx
191191
docker-buildx: ## Build and push docker image for the manager for cross-platform support
192-
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
193-
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
194192
ifeq ($(CONTAINER_TOOL),podman)
195193
$(CONTAINER_TOOL) build --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
196194
$(CONTAINER_TOOL) push ${IMG}
197195
else
196+
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
197+
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
198198
- $(CONTAINER_TOOL) buildx create --name project-v3-builder
199199
$(CONTAINER_TOOL) buildx use project-v3-builder
200200
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
201201
- $(CONTAINER_TOOL) buildx rm project-v3-builder
202-
endif
203202
rm Dockerfile.cross
203+
endif
204204

205205
.PHONY: build-installer
206206
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.

0 commit comments

Comments
 (0)