go-repo/Dockerfile

24 lines
302 B
Docker
Raw Permalink Normal View History

2020-11-21 12:09:47 +01:00
FROM golang:alpine as builder
2020-11-21 12:01:43 +01:00
WORKDIR /go/go.adphi.net/go-repo
COPY go.mod .
RUN go mod download
2020-11-21 12:09:47 +01:00
COPY . .
RUN go build -o go-repo .
FROM alpine
RUN apk add ca-certificates
COPY --from=builder /go/go.adphi.net/go-repo/go-repo /usr/bin/
2020-11-21 12:11:15 +01:00
USER nobody
2020-11-21 12:09:47 +01:00
EXPOSE 8888
ENTRYPOINT ["/usr/bin/go-repo"]