Skip to content

Commit

Permalink
Add missing dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
the-maldridge committed Mar 10, 2021
1 parent e7ea21e commit 8c46663
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.15 as build
WORKDIR /void/repo-exporter
COPY . .
RUN go mod vendor && \
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o /exporter .

FROM alpine:latest as certs
RUN apk --update add ca-certificates

FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /exporter /exporter
LABEL org.opencontainers.image.source https://github.com/void-linux/repo-exporter
ENTRYPOINT ["/exporter"]

0 comments on commit 8c46663

Please sign in to comment.