安装geth

docker run -d --name ethereum-light  --restart always  -p 8200:18545  -v /docker/ethereum-light:/www/.ethereum   ethereum/client-go:v1.8.23 --syncmode=light --cache=1024  --rpc --rpcaddr 0.0.0.0 --rpcport 18545 --rpcapi 'web3,eth,net,personal,admin,txpool' --rpccorsdomain '*'

查看状态

docker ps

启动docker

service docker stop
service docker start

启动docker容器

docker stop ethereum-light
docker start ethereum-light

进去docker里面的命令

docker exec -it ethereum-light geth attach

iptables30303配置

iptables -A INPUT -p all --dport 30303 -j ACCEPT
iptables -A DOCKER  -p tcp --dport 30303 -j ACCEPT
service iptables save

注意!注意!注意!

RPC端口一定不要公开到外网,否则你的币是会被盗走的!!!

最后修改:2019 年 06 月 11 日
如果觉得我的文章对你有用,请随意赞赏