Skip to content

Commit

Permalink
Merge pull request #38 from kube-logging/dockerfile-buildflags
Browse files Browse the repository at this point in the history
docker: add BUILDFLAGS arg
  • Loading branch information
MrAnno authored Aug 7, 2023
2 parents d6ae76f + aa100eb commit b8551ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM --platform=$BUILDPLATFORM golang:1.20-alpine3.18@sha256:7839c9f01b5502d7cb5
ARG TARGETOS
ARG TARGETARCH
ARG TARGETPLATFORM
ARG BUILDFLAGS

RUN apk -U add make

Expand All @@ -20,7 +21,7 @@ RUN go mod download
ADD . .

# Build
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH make build
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH make $BUILDFLAGS build

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down

0 comments on commit b8551ba

Please sign in to comment.