1 功能需求
1) Docker运行环境.
2) 以太坊的环境部署.
3) 节点断开网络连接.
4) 节点恢复网络连接.
2 步骤实施
2.1 Docker网络配置
Default Networks
$ docker network ls
Create Network
$ docker network create -d bridge --subnet 172.25.0.0/16 eth-network
Inspect Network
$ docker network inspect eth-network
2.2 Ethereum环境部署
Pull Ethereum Image
$ docker pull ethereum/client-go
Create Ethereum Node
$ docker run -it -d --name eth-node --network eth-network -p 30303:30303 -p 8545:8545 ethereum/client-go --dev console
Geth JavaScript Console
$ docker attach eth-node
2.3 节点断开网络
Disconnect Network
$ docker network disconnect eth-network eth-node
2.4 节点连接网络
Connect Network
$ docker network connect eth-network eth-node
3 参考链接