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

Commit db6886b

Browse files
committed
runner image uses scratch
1 parent 9cff9db commit db6886b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
FROM golang:1.15.2-buster as builder
2-
ENV CGO_ENABLED 0
3-
ENV GOOS linux
4-
ENV GOARCH amd64
5-
ENV GO111MODULE on
2+
ENV CGO_ENABLED=0 \
3+
GOOS=linux \
4+
GOARCH=amd64 \
5+
GO111MODULE=on
66
WORKDIR /go/src/github.com/kohbis/dimg/
77
COPY . .
88
RUN go build
99

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

0 commit comments

Comments
 (0)