mirror of
https://github.com/cloudflare/gortr.git
synced 2024-05-19 06:50:10 +00:00
24 lines
427 B
Docker
24 lines
427 B
Docker
ARG src_dir="/rtrdump"
|
|
|
|
FROM golang:alpine as builder
|
|
ARG src_dir
|
|
ARG LDFLAGS=""
|
|
|
|
RUN apk --update --no-cache add git && \
|
|
mkdir -p ${src_dir}
|
|
|
|
WORKDIR ${src_dir}
|
|
COPY . .
|
|
|
|
RUN go build -ldflags "${LDFLAGS}" cmd/rtrdump/rtrdump.go
|
|
|
|
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"]
|