Skip to content

Commit

Permalink
Get Dockerfile env vars properly working: (tinkerbell#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 15, 2023
2 parents 0804094 + a3f3122 commit dee5b26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ RUN go mod download
# Copy the go source
COPY ./ ./

# Define args for the target platform so we can identify the binary in the Docker context.
# These args are populated by Docker. The values should match Go's GOOS and GOARCH values for
# the respective os/platform.
ARG TARGETARCH
ARG TARGETOS

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

Expand Down

0 comments on commit dee5b26

Please sign in to comment.