From ddbeb109b1ba9724dd5e7355b2955c4c0aa3af67 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Tue, 3 May 2022 11:56:07 -0700 Subject: [PATCH] docker: use distroless base image to reduce size distroless already includes ca-certificate, but none of the extras included in debian, reducing image by 40% (163 MB versus 275 MB). --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 295ddcf56..e35b368fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,12 +24,8 @@ RUN go run make.go -v -FROM debian:stretch +FROM gcr.io/distroless/base -RUN apt-get update && apt-get install -y --no-install-recommends \ - libsqlite3-dev ca-certificates && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /home/keepy/bin ENV HOME /home/keepy ENV PATH /home/keepy/bin:$PATH @@ -39,4 +35,4 @@ COPY --from=pkbuild /go/bin/perkeepd /home/keepy/bin/ EXPOSE 80 443 3179 8080 WORKDIR /home/keepy -CMD /bin/bash +CMD ["perkeepd"]