Skip to content

Commit

Permalink
build: optimize binary size in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgouveia committed Feb 15, 2023
1 parent f6f8126 commit e3bbbd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.19 as build
WORKDIR /build
COPY . .
RUN go build -o alpha main.go
RUN go build -o alpha -a -gcflags=all="-l -B -wb=false" -ldflags="-w -s" main.go

FROM scratch
COPY --from=build /build/alpha ./alpha
Expand Down

0 comments on commit e3bbbd6

Please sign in to comment.