We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9e7ccd commit 07999a4Copy full SHA for 07999a4
Dockerfile
@@ -7,6 +7,9 @@ FROM ${GOLANG_IMAGE} AS golang
7
FROM registry.access.redhat.com/ubi8/ubi@sha256:fd3bf22d0593e2ed26a1c74ce161c52295711a67de677b5938c87704237e49b0 AS builder
8
ARG GOLANG_VERSION=1.23.0
9
10
+ARG TARGETOS TARGETARCH
11
+RUN echo "GOOS=${TARGETOS} GOARCH=${TARGETARCH}"
12
+
13
# Install system dependencies
14
RUN dnf upgrade -y && dnf install -y \
15
gcc \
@@ -34,7 +37,7 @@ COPY pkg/ pkg/
34
37
35
38
# Build
36
39
USER root
-RUN CGO_ENABLED=1 GOOS=linux GOARCH=${GOARCH} make go-build-for-image
40
+RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make go-build-for-image
41
42
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
43
WORKDIR /
0 commit comments