Skip to content

Commit

Permalink
maint: reduce binary size in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Jul 1, 2024
1 parent 23ec0f5 commit f265e26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY sources/ sources/

# Build
RUN --mount=type=cache,target=/root/.cache/go-build \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o source main.go
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -trimpath -o source main.go

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

0 comments on commit f265e26

Please sign in to comment.