This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine as builder | |
WORKDIR /app | |
RUN apk update && apk upgrade && apk add --no-cache ca-certificates | |
RUN update-ca-certificates | |
ADD main.go /app/main.go | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o app . | |
FROM scratch | |
COPY --from=builder /app/app . | |
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ |