Skip to content

Commit

Permalink
Fix Docker run -p for both TCP and UDP (#2998)
Browse files Browse the repository at this point in the history
## Issue Addressed

[Docker run] ... "-p 9000:9000" defaults to expose TCP only.

## Proposed Changes

Add "-p 9000:9000/udp" for UDP peer discovery.
  • Loading branch information
ladidan committed Feb 7, 2022
1 parent 36fc887 commit 1fd883d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions book/src/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $ docker run lighthouse:local lighthouse --help
You can run a Docker beacon node with the following command:

```bash
$ docker run -p 9000:9000 -p 127.0.0.1:5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse --network mainnet beacon --http --http-address 0.0.0.0
$ docker run -p 9000:9000/tcp -p 9000:9000/udp -p 127.0.0.1:5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse --network mainnet beacon --http --http-address 0.0.0.0
```

> To join the Pyrmont testnet, use `--network pyrmont` instead.
Expand All @@ -130,18 +130,18 @@ $ docker run -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse b

### Ports

In order to be a good peer and serve other peers you should expose port `9000`.
In order to be a good peer and serve other peers you should expose port `9000` for both TCP and UDP.
Use the `-p` flag to do this:

```bash
$ docker run -p 9000:9000 sigp/lighthouse lighthouse beacon
$ docker run -p 9000:9000/tcp -p 9000:9000/udp sigp/lighthouse lighthouse beacon
```

If you use the `--http` flag you may also want to expose the HTTP port with `-p
127.0.0.1:5052:5052`.

```bash
$ docker run -p 9000:9000 -p 127.0.0.1:5052:5052 sigp/lighthouse lighthouse beacon --http --http-address 0.0.0.0
$ docker run -p 9000:9000/tcp -p 9000:9000/udp -p 127.0.0.1:5052:5052 sigp/lighthouse lighthouse beacon --http --http-address 0.0.0.0
```

[docker_hub]: https://hub.docker.com/repository/docker/sigp/lighthouse/

0 comments on commit 1fd883d

Please sign in to comment.