1
0
mirror of https://github.com/cloudflare/gortr.git synced 2024-05-19 06:50:10 +00:00
cloudflare-gortr/Dockerfile.rtrdump

24 lines
427 B
Docker
Raw Permalink Normal View History

ARG src_dir="/rtrdump"
2018-08-07 11:09:50 -07:00
2018-09-22 17:24:11 +03:00
FROM golang:alpine as builder
ARG src_dir
2020-10-28 17:09:13 -07:00
ARG LDFLAGS=""
2018-08-07 11:09:50 -07:00
2018-09-22 17:24:11 +03:00
RUN apk --update --no-cache add git && \
mkdir -p ${src_dir}
WORKDIR ${src_dir}
COPY . .
2020-10-28 17:09:13 -07:00
RUN go build -ldflags "${LDFLAGS}" cmd/rtrdump/rtrdump.go
2018-09-22 17:24:11 +03:00
FROM alpine:latest
ARG src_dir
RUN apk --update --no-cache add ca-certificates && \
adduser -S -D -H -h / rtr
USER rtr
COPY --from=builder ${src_dir}/rtrdump /
ENTRYPOINT ["./rtrdump"]