Skip to content

Commit

Permalink
docker: strip binary
Browse files Browse the repository at this point in the history
  • Loading branch information
narqo committed Sep 22, 2020
1 parent 1be116b commit d7290b9
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
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.15-alpine as builder
RUN apk add --update --no-cache build-base ca-certificates
WORKDIR /go/src/github-weather
COPY . /go/src/github-weather
RUN CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o bin/github-weather .
RUN CGO_ENABLED=0 go build -a -ldflags '-s -w -extldflags "-static"' -o bin/github-weather .

FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Expand Down

0 comments on commit d7290b9

Please sign in to comment.