🔧 Modify Dockerfile

This commit is contained in:
Nite07 2024-05-07 13:10:49 +08:00
parent 4ee5f15f30
commit 2f85ef7c96
2 changed files with 9 additions and 7 deletions

View File

@ -13,6 +13,7 @@ RUN mkdir /app/certs
ENV DERP_HOSTNAME example.com ENV DERP_HOSTNAME example.com
ENV DERP_CERTMODE letsencrypt ENV DERP_CERTMODE letsencrypt
ENV DERP_ADDR :443 ENV DERP_ADDR :443
ENV DERP_VERIFY_CLIENTS false
COPY --from=builder /go/bin/derper . COPY --from=builder /go/bin/derper .
@ -23,7 +24,7 @@ VOLUME ["/app/certs"]
CMD /app/derper --hostname=$DERP_HOSTNAME \ CMD /app/derper --hostname=$DERP_HOSTNAME \
--a=$DERP_ADDR \ --a=$DERP_ADDR \
--certdir=/app/certs \ --certdir=/app/certs \
--verify-clients=true \ --verify-clients=$DERP_VERIFY_CLIENTS \
--certmode=$DERP_CERTMODE --certmode=$DERP_CERTMODE
# derper --help # derper --help

View File

@ -1,10 +1,11 @@
# Environment Variables # Environment Variables
| Name | Description | Default Value | | Name | Description | Default Value |
| ------------- | ------------------------------------------------------------------------------------ | ------------- | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| DERP_HOSTNAME | Specifies the domain for the DERP server. | `example.com` | | DERP_HOSTNAME | Specifies the domain for the DERP server. | `example.com` |
| DERP_CERTMODE | Determines the SSL/TLS certificate management mode. Options: `manual`, `letsencrypt` | `letsencrypt` | | DERP_CERTMODE | Determines the SSL/TLS certificate management mode. Options: `manual`, `letsencrypt` | `letsencrypt` |
| DERP_ADDR | Sets the server address and port to bind to. | `:443` | | DERP_ADDR | Sets the server address and port to bind to. | `:443` |
| DERP_VERIFY_CLIENTS | Whether to verify clients connecting to the DERP server. [reference](https://tailscale.com/kb/1118/custom-derp-servers#optional-restricting-client-access-to-your-derp-node) | `false` |
# Volumes # Volumes
@ -37,4 +38,4 @@ docker run -d --name derper \
## Adding DERP servers to your tailnet ## Adding DERP servers to your tailnet
reference: https://tailscale.com/kb/1118/custom-derp-servers#step-2-adding-derp-servers-to-your-tailnet [reference](https://tailscale.com/kb/1118/custom-derp-servers#step-2-adding-derp-servers-to-your-tailnet)