From f80246409a272399c56cd3e4c977c21d6b0ee803 Mon Sep 17 00:00:00 2001 From: rimas Date: Mon, 26 Aug 2019 19:05:16 +0100 Subject: [PATCH] Use gcr.io/distroless/static --- Dockerfile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39c4215..ff1b3de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.12-alpine as builder # Install dependencies -RUN apk update && apk add --update gcc git musl-dev curl +RUN apk add --no-cache git # Set workspace WORKDIR /src/kubenab/kubenab/ @@ -18,17 +18,10 @@ RUN cd cmd/kubenab && \ RUN cd cmd/kubenab && \ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a --installsuffix cgo --ldflags="-s" -o /kubenab -# Runnable image -FROM alpine:3.9 - -# Install dependencies -RUN apk update && apk add --update curl ca-certificates +FROM gcr.io/distroless/static # Copy microservice executable from builder image COPY --from=builder /kubenab /bin/kubenab -# Directory for tls -RUN mkdir -p /etc/admission-controller/tls - # Set Entrypoint -CMD ["/bin/kubenab"] +CMD ["kubenab"]