We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e330e9c commit 1e29e0cCopy full SHA for 1e29e0c
project-clone/Dockerfile
@@ -16,6 +16,8 @@
16
# Build the manager binary
17
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi9/go-toolset
18
FROM registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472 as builder
19
+ARG TARGETARCH
20
+ARG TARGETOS
21
ENV GOPATH=/go/
22
USER root
23
WORKDIR /project-clone
@@ -30,7 +32,7 @@ RUN go mod download
30
32
COPY . .
31
33
34
# compile workspace controller binaries
-RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build \
35
+RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build \
36
-a -o _output/bin/project-clone \
37
-gcflags all=-trimpath=/ \
38
-asmflags all=-trimpath=/ \
0 commit comments