Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

docs: add docs for docker deployment #111

wants to merge 2 commits into from

Conversation

xuhe2
Copy link

@xuhe2 xuhe2 commented Aug 7, 2024

add docs for docker deployment
add EXPOSE 8080 into Dockerfile

readme.md Outdated
@@ -54,6 +54,13 @@ $ cd SpoofDPI
$ go build ./cmd/...
```

## docker
Copy link
Owner

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
Copy link
Owner

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

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

@xvzc
Copy link
Owner

xvzc commented Aug 7, 2024

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.

@xuhe2
Copy link
Author

xuhe2 commented Aug 7, 2024

I will solve these problems and change the chinese readme.md, then craete a new PR
thanks for your suggestion.

@xuhe2
Copy link
Author

xuhe2 commented Aug 7, 2024

OK, I has fixed it and change the chinese readme.md
please review it

@TeaDove
Copy link

TeaDove commented Aug 25, 2024

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.

@xuhe2
Copy link
Author

xuhe2 commented Aug 26, 2024

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

@xvzc
Copy link
Owner

xvzc commented Aug 26, 2024

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.

@ponfertato
Copy link

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 spoofdpi network at http://spoofdpi:8080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants