Skip to content

Commit 1fd883d

Browse files
committed
Fix Docker run -p for both TCP and UDP (#2998)
## Issue Addressed [Docker run] ... "-p 9000:9000" defaults to expose TCP only. ## Proposed Changes Add "-p 9000:9000/udp" for UDP peer discovery.
1 parent 36fc887 commit 1fd883d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

book/src/docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ $ docker run lighthouse:local lighthouse --help
107107
You can run a Docker beacon node with the following command:
108108

109109
```bash
110-
$ 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
110+
$ 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
111111
```
112112

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

131131
### Ports
132132

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

136136
```bash
137-
$ docker run -p 9000:9000 sigp/lighthouse lighthouse beacon
137+
$ docker run -p 9000:9000/tcp -p 9000:9000/udp sigp/lighthouse lighthouse beacon
138138
```
139139

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

143143
```bash
144-
$ docker run -p 9000:9000 -p 127.0.0.1:5052:5052 sigp/lighthouse lighthouse beacon --http --http-address 0.0.0.0
144+
$ 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
145145
```
146146

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

0 commit comments

Comments
 (0)