Skip to content

Commit

Permalink
Migrate to images from scratch (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
hudymi authored Nov 27, 2019
1 parent 855bd07 commit 4c5db7d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o service main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:latest
# Certificates
FROM alpine:latest as certs
RUN apk --update add ca-certificates

FROM scratch
LABEL source = [email protected]:michal-hudy/mockice.git
WORKDIR /
COPY --from=builder /workspace/service .
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ENTRYPOINT ["/service"]

0 comments on commit 4c5db7d

Please sign in to comment.