2018-09-22 17:26:51 +03:00
|
|
|
ARG src_uri=github.com/cloudflare/gortr/cmd/gortr
|
|
|
|
|
|
|
|
FROM golang:alpine as builder
|
|
|
|
ARG src_uri
|
|
|
|
|
|
|
|
RUN apk --update --no-cache add git && \
|
|
|
|
go get -u $src_uri
|
|
|
|
|
2019-04-11 14:25:14 -07:00
|
|
|
FROM alpine:latest as keygen
|
|
|
|
|
|
|
|
RUN apk --update --no-cache add openssl
|
|
|
|
RUN openssl ecparam -genkey -name prime256v1 -noout -outform pem > private.pem
|
|
|
|
|
2018-09-22 17:26:51 +03:00
|
|
|
FROM alpine:latest
|
|
|
|
ARG src_uri
|
|
|
|
|
|
|
|
RUN apk --update --no-cache add ca-certificates && \
|
|
|
|
adduser -S -D -H -h / rtr
|
|
|
|
USER rtr
|
|
|
|
|
2019-03-20 21:29:42 -07:00
|
|
|
COPY --from=builder /go/bin/gortr /
|
|
|
|
COPY cmd/gortr/cf.pub /
|
2019-04-11 14:25:14 -07:00
|
|
|
COPY --from=keygen /private.pem /private.pem
|
2018-09-22 17:26:51 +03:00
|
|
|
ENTRYPOINT ["./gortr"]
|