ssl-certs-checker/Dockerfile
2022-01-30 17:47:59 +08:00

14 lines
508 B
Docker

FROM golang:1.17-alpine3.15 AS builder
LABEL maintainer="guessi <guessi@gmail.com>"
RUN apk add --no-cache git ca-certificates
WORKDIR ${GOPATH}/src/github.com/guessi/ssl-certs-checker
COPY . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /go/bin/ssl-certs-checker
FROM scratch
LABEL maintainer="guessi <guessi@gmail.com>"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/bin/ssl-certs-checker /opt/
WORKDIR /opt/
ENTRYPOINT ["/opt/ssl-certs-checker"]