go-repo/Dockerfile

24 lines
302 B
Docker
Raw Normal View History

2020-11-21 11:09:47 +00:00
FROM golang:alpine as builder
2020-11-21 11:01:43 +00:00
WORKDIR /go/go.adphi.net/go-repo
COPY go.mod .
RUN go mod download
2020-11-21 11:09:47 +00: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 11:11:15 +00:00
USER nobody
2020-11-21 11:09:47 +00:00
EXPOSE 8888
ENTRYPOINT ["/usr/bin/go-repo"]