From 6cd0000b865b954ce2c4e333cd602b68f5274b77 Mon Sep 17 00:00:00 2001 From: "Halim, Abdul" Date: Mon, 22 Apr 2024 06:42:58 -0400 Subject: [PATCH] fix broken multi-arch image build for ipu-plugin fix make imagex build errors for multi-arch image build. Signed-off-by: Halim, Abdul --- ipu-plugin/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipu-plugin/Makefile b/ipu-plugin/Makefile index 58a9e26..582dfcf 100644 --- a/ipu-plugin/Makefile +++ b/ipu-plugin/Makefile @@ -64,7 +64,8 @@ imagex: ## Build and push docker image for the manager for cross-platform suppor cp -r ../e2e/artefacts/p4-rh_mvp $(CURDIR) # 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 - - $(IMGTOOL) buildx create --name image-builder --use --buildkitd-flags '--allow-insecure-entitlement security.insecure' --driver-opt env.http_proxy=$(HTTP_PROXY) --driver-opt env.https_proxy=$(HTTPS_PROXY) --driver-opt '"env.no_proxy='$(NO_PROXY)'" $(IMGTOOL) buildx use image-builder + - $(IMGTOOL) buildx create --name image-builder --use --buildkitd-flags '--allow-insecure-entitlement security.insecure' --driver-opt env.http_proxy=$(HTTP_PROXY) --driver-opt env.https_proxy=$(HTTPS_PROXY) --driver-opt '"env.no_proxy='$(NO_PROXY)'"' + - $(IMGTOOL) buildx use image-builder - $(IMGTOOL) buildx build --allow security.insecure --push --platform=$(PLATFORMS) --tag ${IMAGE_TAG_VERSION} --tag ${IMAGE_TAG_LATEST} -f $(DOCKERFILE).cross $(CURDIR) $(DOCKERARGS) - $(IMGTOOL) buildx rm image-builder rm $(DOCKERFILE).cross