Skip to content

Commit

Permalink
added TARGETOS and TARGETARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Gupta authored and Satyam Gupta committed Apr 22, 2024
1 parent b8e9285 commit 4376bf9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
ARG GOLANG_VERSION=1.19
ARG USE_LOCAL=false
ARG OVERWRITE_MANIFESTS=""
ARG TARGETOS
ARG TARGETARCH

################################################################################
FROM registry.access.redhat.com/ubi8/go-toolset:$GOLANG_VERSION as builder_local_false
Expand Down Expand Up @@ -39,7 +41,7 @@ COPY main.go main.go
COPY pkg/ pkg/

# Build
RUN CGO_ENABLED=0 GOOS=linux go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager main.go

################################################################################
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
Expand Down

0 comments on commit 4376bf9

Please sign in to comment.