From 92dade1312d5d85e4d1e1007341f047319d9f986 Mon Sep 17 00:00:00 2001 From: Bartuccio Antoine Date: Mon, 18 May 2020 21:23:59 +0200 Subject: [PATCH] =?UTF-8?q?Peter=20il=20a=20la=20m=C3=A9ga=20chiasse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc27039..de3cbd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,16 +6,14 @@ WORKDIR /build # Copy the code from the host and compile it COPY . . -RUN go build - RUN mkdir res COPY quotes.json res/quotes.json RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app . -# We use Alpine for it's ca-certificates needed by http lib -FROM alpine:latest -RUN apk add --no-cache ca-certificates apache2-utils +FROM scratch +# We need ca-certifactes for http calls +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /app ./ COPY --from=builder /build/res ./