mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Docker rpc (#3868)
* move name before docker image; add info on how to start gRPC * updates on how to run beacon from docker
This commit is contained in:
parent
7d1633230d
commit
d4e7e15e50
22
README.md
22
README.md
@ -98,12 +98,26 @@ To understand the role that both the beacon node and validator play in Prysm, se
|
||||
To start your beacon node, issue the following command:
|
||||
|
||||
```
|
||||
docker run -v $HOME/prysm-data:/data -p 4000:4000 --name beacon-node \
|
||||
docker run -v $HOME/prysm-data:/data -p 4000:4000 \
|
||||
--name beacon-node \
|
||||
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
||||
--no-genesis-delay \
|
||||
--datadir=/data
|
||||
```
|
||||
|
||||
The beacon node can be halted by either using `Ctrl+c` or with the command:
|
||||
(Optional) If you want to enable gRPC, then run this command instead of the one above:
|
||||
|
||||
```
|
||||
docker run -v $HOME/prysm-data:/data -p 4000:4000 -p 7000:7000 \
|
||||
--name beacon-node \
|
||||
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
||||
--datadir=/data \
|
||||
--no-genesis-delay \
|
||||
--grpc-gateway-port=7000
|
||||
```
|
||||
|
||||
You can stop the beacon node using `Ctrl+c` or with the following command:
|
||||
=======
|
||||
|
||||
```
|
||||
docker stop beacon-node
|
||||
@ -121,13 +135,13 @@ To delete a corrupted container, issue the command:
|
||||
docker rm beacon-node
|
||||
```
|
||||
|
||||
To recreate a deleted container and refresh the chain database, issue the start command with an additional `--clear-db` parameter:
|
||||
To recreate a deleted container and refresh the chain database, issue the start command with an additional `--force-clear-db` parameter:
|
||||
|
||||
```
|
||||
docker run -it -v $HOME/prysm-data:/data -p 4000:4000 --name beacon-node \
|
||||
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
||||
--datadir=/data \
|
||||
--clear-db
|
||||
--force-clear-db
|
||||
```
|
||||
|
||||
**Docker on Windows:**
|
||||
|
@ -17,6 +17,7 @@ IDENTITY="" # P2P private key
|
||||
PEERS="" # Comma separated list of peers
|
||||
GEN_STATE="" # filepath to ssz encoded state.
|
||||
PORT="8000" # port to serve p2p traffic
|
||||
RPCPORT="8001" # port to serve rpc traffic
|
||||
YAML_KEY_FILE="" # Path to yaml keyfile as defined here: https://github.com/ethereum/eth2.0-pm/tree/master/interop/mocked_start
|
||||
|
||||
# Constants
|
||||
@ -28,7 +29,8 @@ usage() {
|
||||
echo "--peer=<peer>"
|
||||
echo "--num-validators=<number>"
|
||||
echo "--gen-state=<file path>"
|
||||
port "--port=<port number>"
|
||||
echo "--port=<port number>"
|
||||
echo "--rpcport=<port number>"
|
||||
}
|
||||
|
||||
while [ "$1" != "" ];
|
||||
@ -53,6 +55,9 @@ do
|
||||
--port)
|
||||
PORT=$VALUE
|
||||
;;
|
||||
--rpcport)
|
||||
RPCPORT=$VALUE
|
||||
;;
|
||||
--help)
|
||||
usage
|
||||
exit
|
||||
@ -81,6 +86,7 @@ echo -n "$IDENTITY" > /tmp/id.key
|
||||
BEACON_FLAGS="--bootstrap-node= \
|
||||
--deposit-contract=0xD775140349E6A5D12524C6ccc3d6A1d4519D4029 \
|
||||
--p2p-port=$PORT \
|
||||
--grpc-gateway-port=$RPCPORT \
|
||||
--peer=$PEERS \
|
||||
--interop-genesis-state=$GEN_STATE \
|
||||
--p2p-priv-key=/tmp/id.key \
|
||||
|
Loading…
Reference in New Issue
Block a user