官网:OpenEthereum github
文档: 运行参数
docker cli
docker run -tid --name parity \
-v /www/openethereum/chaindata/:/chaindata/ \
-p 7788:8545 \
-p 7799:8546 \
-p 30303:30303 \
-p 30303:30303/udp \
openethereum/openethereum:latest --base-path /chaindata/
或者
docker-compose.yml
version: "3"
services:
openethereum:
image: openethereum/openethereum:latest
container_name: openethereum
restart: unless-stopped
ports:
- "30303:30303"
- "30303:30303/udp"
- "127.0.0.1:8545:8545"
- "127.0.0.1:8546:8546"
user: openethereum
volumes:
- ./chaindata:/chaindata
stop_signal: SIGINT
stop_grace_period: 2m
command:
- --base-path=/chaindata
- --jsonrpc-interface=all
- --jsonrpc-cors=all
- --ws-interface=all
- --ws-origins=all
- --no-ipc
- --scale-verifiers
- --num-verifiers=4
- --pruning=fast
- --pruning-memory=512
- --cache-size-db=1024
- --cache-size-blocks=128
- --cache-size-queue=512
- --cache-size-state=256
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "10"
创建目录并赋予权限
mkdir -p chaindata && chown -R 1000:1000 chaindata
运行脚本
docker-compose up -d