[root@jiaxin-ceshi-ceshi ~]# docker run -d -p 2222:22 -p 9999:80 --restart=always --name jpserver 80e9ddba8da6
96b95056abfbb101a236ecb863d6b2387b15c6c6ad659ad7706b4be11333a7ad
Error response from daemon: Cannot start container 96b95056abfbb101a236ecb863d6b2387b15c6c6ad659ad7706b4be11333a7ad: Error starting userland proxy: listen tcp 0.0.0.0:2222: bind: address already in use
docker 启动 web 示例报错如下:
Error response from daemon: Cannot start container web: iptables failed: iptables -t nat -A DOCKER -p tcp -d 0/0 --dport 32797 -j DNAT --to-destination 172.17.0.30:5000 ! -i docker0: iptables: No chain/target/match by that name.1
解决办法:重建docker0网络恢复
pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
docker -d
service docker restart
[root@jiaxin-ceshi-ceshi ~]# /etc/init.d/docker restart
[root@jiaxin-ceshi-ceshi ~]# docker images