cert-deets/Dockerfile
2026-02-13 08:52:22 +00:00

15 lines
418 B
Docker

FROM --platform=${BUILDPLATFORM} golang:alpine AS build
ARG TARGETARCH
ARG TARGETOS
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY main.go ./
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -v -ldflags="-w -s"
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /src/cert-deets /usr/local/bin/
ENTRYPOINT [ "/usr/local/bin/cert-deets" ]