Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
runner image uses scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
kohbis committed Oct 12, 2020
1 parent 9cff9db commit db6886b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM golang:1.15.2-buster as builder
ENV CGO_ENABLED 0
ENV GOOS linux
ENV GOARCH amd64
ENV GO111MODULE on
ENV CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64 \
GO111MODULE=on
WORKDIR /go/src/github.com/kohbis/dimg/
COPY . .
RUN go build

FROM alpine:3.12 as runner
FROM scratch as runner
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/src/github.com/kohbis/dimg/dimg /usr/local/bin/dimg
ENTRYPOINT ["dimg"]

0 comments on commit db6886b

Please sign in to comment.