Dockerize tailscale.com/cmd/derper released versions
1.6K
Dockerize tailscale.com/cmd/derper released versions.
| Name | Description | Default Value |
|---|---|---|
| DERP_DOMAIN | Derper server hostname | your-hostname.com |
| DERP_CERT | Path to the SSL certificate | /app/certs/your-hostname.com.cer |
| DERP_CERT_KEY | Path to the SSL certificate key | /app/certs/your-hostname.com.key |
| DERP_ADDR | Listening server address | :443 |
| DERP_STUN | Whether also run a STUN server | true |
| DERP_STUN_PORT | The UDP port on which to serve STUN. | 3478 |
| DERP_HTTP_PORT | The port on which to serve HTTP. Set to -1 to disable | 80 |
| DERP_VERIFY_CLIENTS | Whether verify clients to this DERP server through a local tailscaled instance | false |
Dockerfile
ARG DOCKERHUB_REGISTRY=docker.io
ARG VERSION=1.66.4
ARG GOLANG_VERSION=1.22.4
FROM ${DOCKERHUB_REGISTRY}/library/golang:${GOLANG_VERSION} AS builder
ARG VERSION
WORKDIR /app
RUN go install tailscale.com/cmd/derper@v${VERSION}
FROM ${DOCKERHUB_REGISTRY}/library/ubuntu:22.04
ARG DOCKERHUB_REGISTRY
WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends apt-utils && \
apt-get install -y ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV DERP_DOMAIN your-hostname.com
ENV DERP_CERT /app/certs/your-hostname.com.cer
ENV DERP_CERT_KEY /app/certs/your-hostname.com.key
ENV DERP_ADDR :443
ENV DERP_STUN true
ENV DERP_STUN_PORT 3478
ENV DERP_HTTP_PORT 80
ENV DERP_VERIFY_CLIENTS false
COPY --from=builder /go/bin/derper .
ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
RUN chmod a+x /usr/local/bin/docker_entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]
docker_entrypoint.sh
#!/bin/bash
set -ou pipefail
if [ $# -eq 0 ]; then
mkdir -p /app/certs
cp ${DERP_CERT} /app/certs/${DERP_DOMAIN}.crt
cp ${DERP_CERT_KEY} /app/certs/${DERP_DOMAIN}.key
/app/derper --hostname=${DERP_DOMAIN} \
--certmode=manual \
--certdir=/app/certs \
--a=${DERP_ADDR} \
--stun=${DERP_STUN} \
--stun-port=${DERP_STUN_PORT} \
--http-port=${DERP_HTTP_PORT} \
--verify-clients=${DERP_VERIFY_CLIENTS}
else
exec "$@"
fi
Content type
Image
Digest
sha256:c3dee78c4…
Size
42.6 MB
Last updated
19 days ago
docker pull cookding/tailscale-derper:1.102.3