bagage/Dockerfile

13 lines
378 B
Text
Raw Permalink Normal View History

FROM golang:1.17.0-alpine3.14 as builder
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
WORKDIR /opt
2021-09-03 08:53:06 +00:00
COPY *.go go.mod go.sum /opt/
RUN go build .
FROM scratch
COPY --from=builder /opt/bagage /
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
USER 1000:1000
ENTRYPOINT ["/bagage"]