From da9c75e392fe35a7692af210fe8311b8fe3c03e6 Mon Sep 17 00:00:00 2001 From: terorie Date: Fri, 22 Feb 2019 21:37:04 +0100 Subject: [PATCH] Reduce Docker image size --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7dcbc20..29e7d1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,10 @@ FROM golang:alpine as builder ADD . /go/src/github.com/terorie/od-database-crawler RUN apk add git \ && go get -d -v github.com/terorie/od-database-crawler \ - && CGO_ENABLED=0 go install -a -installsuffix cgo github.com/terorie/od-database-crawler + && CGO_ENABLED=0 go install -a \ + -installsuffix cgo \ + -ldflags="-s -w" \ + github.com/terorie/od-database-crawler FROM scratch COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/