From 331850d122792b8fd228b6afce8476196b5eb8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rold=C3=A1n=20Betancort?= Date: Wed, 17 Aug 2022 11:23:02 +0100 Subject: [PATCH] use distroless.dev/static as base image futher reduces surface, image size, and fixes a bunch of CVEs in the google distroless base image --- Dockerfile | 2 +- Dockerfile.release | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1238ee77..f0f6ce47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,6 @@ COPY . /go/src/zed RUN go mod download RUN go install ./cmd/zed -FROM gcr.io/distroless/base +FROM distroless.dev/static COPY --from=build /go/bin/* /usr/local/bin/ ENTRYPOINT ["zed"] diff --git a/Dockerfile.release b/Dockerfile.release index 692bab7e..1399ac05 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -1,4 +1,6 @@ # vim: syntax=dockerfile -FROM gcr.io/distroless/base +ARG BASE=distroless.dev/static +FROM $BASE + COPY zed /usr/local/bin/zed ENTRYPOINT ["zed"]