From d7290b9aabd8a42633ac88bd2c94eea92a972549 Mon Sep 17 00:00:00 2001 From: Vladimir Varankin Date: Wed, 23 Sep 2020 00:04:21 +0200 Subject: [PATCH] docker: strip binary --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 83307ad..89ed427 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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