-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add docs for docker deployment #111
base: main
Are you sure you want to change the base?
Conversation
readme.md
Outdated
@@ -54,6 +54,13 @@ $ cd SpoofDPI | |||
$ go build ./cmd/... | |||
``` | |||
|
|||
## docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please capitalize the title
```shell | ||
docker build ./ -t spoof-dpi:latest | ||
``` | ||
Use `docker run -it -p 8080:8080 --name spoof-dpi spoof-dpi:latest` to run container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should show some other example that passes options through the docker run command like below
$ docker run -it -p 8080:8080 spoof-dpi:latest --enable-doh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xvzc Better also add --name "..."
and --rm
to avoid generating a lot of garbage after each restart.
https://docs.docker.com/reference/cli/docker/container/run/#rm
We should update all the other languages of readme files when updating documentation. you can just write them in english so that other people can translate them later. |
I will solve these problems and change the chinese readme.md, then craete a new PR |
…nge chinese readme.md
OK, I has fixed it and change the chinese readme.md |
Maybe also add example with docker-compose? A lot of people (like me) likes running docker containers using docker-compose. I have example with building and passing args: version: '3.9'
services:
spoof-dpi:
build:
context: .
dockerfile: Dockerfile
command: "-debug"
restart: always
ports:
- "8080:8080" If you are not into adding, I can add it after this PR merge. |
thanks for your example, I will add it into README.md |
I've been thinking of moving the installation instruction into a separate markdown file. i will let you know when it's ready for this. |
Hi! Without specifying the address 0.0.0.0 proxy will not work, I suggest this option under Compose (I have it working in tandem with Peertube): networks:
spoofdpi:
attachable: true
name: spoofdpi
services:
spoofdpi:
container_name: spoofdpi
command: '-addr 0.0.0.0 -enable-doh -debug'
build:
context: .
dockerfile: Dockerfile
tty: true
stdin_open: true
networks:
- spoofdpi
restart: unless-stopped If you use it inside your Compose project, it can be accessed between containers using the |
add docs for docker deployment
add
EXPOSE 8080
into Dockerfile