Change the base image to distroless (#4055)

Change the base image to distroless

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
pull/4061/head
Wenkai Yin(尹文开) 2021-08-20 16:01:06 +08:00 committed by GitHub
parent 15d7a9dfb6
commit 23e0e5d18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -50,13 +50,11 @@ RUN mkdir -p /output/usr/bin && \
go build -o /output/${BIN} \
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}
FROM ubuntu:focal
FROM gcr.io/distroless/base-debian10:nonroot
LABEL maintainer="Nolan Brubaker <brubakern@vmware.com>"
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ca-certificates tzdata && rm -rf /var/lib/apt/lists/*
COPY --from=builder /output /
USER nobody:nogroup
USER nonroot:nonroot

View File

@ -0,0 +1 @@
Change the base image to distroless