Docker 默认地址是 172.17.0.1
改一下方便本地机和服务器上 docker 远程访问
sudo service docker stop
sudo ip link set dev docker0 down
sudo brctl delbr docker0 # sudo apt-get install bridge-util
sudo iptables -t nat -F POSTROUTING
sudo brctl addbr docker0
sudo ip addr add xxx.xxx.xxx.xxx/xx dev docker0
sudo ip link set dev docker0 up
vi /etc/docker/daemon.json
{
...
"bip": "xxx.xxx.xxx.xxx/xxx",
...
}
sudo service docker start