Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from jfrog/use-distroless-image
Browse files Browse the repository at this point in the history
Use gcr.io/distroless/static
  • Loading branch information
rimusz authored Aug 26, 2019
2 parents e7bb440 + f802464 commit 182dad6
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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"]

0 comments on commit 182dad6

Please # to comment.