From 15ac293624359c3373c2102b38b7aea286ae5987 Mon Sep 17 00:00:00 2001 From: nite07 Date: Mon, 6 May 2024 13:02:57 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20Begin=20the=20project.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..29c6cc7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM golang:latest AS builder +WORKDIR /app + +# https://tailscale.com/kb/1118/custom-derp-servers/ +RUN go install tailscale.com/cmd/derper@main + +FROM alpine:latest +WORKDIR /app + +RUN apk --no-cache add ca-certificates +RUN mkdir /app/certs + +ENV DERP_DOMAIN example.com + +COPY --from=builder /go/bin/derper . + +EXPOSE 80 443 3478 +VOLUME ["/app/certs"] + +CMD /app/derper --hostname=$DERP_DOMAIN \ + --certdir=/app/certs \ + --verify-clients=true