From 02a6082848aded56a3c5d046e21e046daeff89ef Mon Sep 17 00:00:00 2001 From: Qing Hao Date: Mon, 5 Jun 2023 13:35:13 +0800 Subject: [PATCH] fix arm image build issue (#114) Signed-off-by: haoqing0110 --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3e02ffc1..2e5b4a32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,16 @@ FROM golang:1.19 AS builder +ARG OS=linux +ARG ARCH=amd64 WORKDIR /go/src/open-cluster-management.io/placement COPY . . ENV GO_PACKAGE open-cluster-management.io/placement -RUN make build --warn-undefined-variables -RUN make build-e2e --warn-undefined-variables +RUN GOOS=${OS} \ + GOARCH=${ARCH} \ + make build --warn-undefined-variables +RUN GOOS=${OS} \ + GOARCH=${ARCH} \ + make build-e2e --warn-undefined-variables FROM registry.access.redhat.com/ubi8/ubi-minimal:latest ENV USER_UID=10001