mirror of
https://github.com/fredliang44/derper-docker.git
synced 2024-09-20 14:56:15 +08:00
feat: init container
This commit is contained in:
commit
47416c3ba2
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
FROM golang:latest AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# https://tailscale.com/kb/1118/custom-derp-servers/
|
||||
RUN go install tailscale.com/cmd/derper@main
|
||||
|
||||
FROM ubuntu
|
||||
WORKDIR /app
|
||||
|
||||
ENV DEPR_HOSTNAME your-hostname.com
|
||||
COPY --from=builder /go/bin/derper .
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
|
||||
CMD ["/app/derper", "--hostname", "${DEPR_HOSTNAME}"]
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Derper
|
||||
|
||||
# Setup
|
||||
|
||||
> required: set env `DEPR_HOSTNAME` to your domain
|
||||
|
||||
```bash
|
||||
docker run -e DEPR_HOSTNAME=derper.your-domain.com fredliang/derper
|
||||
```
|
2
entrypoint.sh
Normal file
2
entrypoint.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/app/derper --hostname ${DEPR_HOSTNAME}
|
Loading…
Reference in a new issue