Change the base image to distroless (#4055)
Change the base image to distroless Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>pull/4061/head
parent
15d7a9dfb6
commit
23e0e5d18f
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Change the base image to distroless
|
Loading…
Reference in New Issue