【原】Error response from daemon Cannot start container

docker run -d -p 90:80 hub.c.163.com/library/nginx

[root@testlocal ~]# docker run -d -p 90:80 hub.c.163.com/library/nginx

484ac06e9359b2f92b5b53cd12c431f2a84abafdc47af745b38fa1075ab51e44

Error response from daemon: Cannot start container 484ac06e9359b2f92b5b53cd12c431f2a84abafdc47af745b38fa1075ab51e44: iptables failed: iptables -t nat -A DOCKER -p tcp -d 0/0 --dport 90 -j DNAT --to-destination 172.17.0.11:80 ! -i docker0: iptables: No chain/target/match by that name.

(exit status 1)

解决办法:

centos

yum remove docker-engine

yum installdocker-engine

ubuntu

apt-get remove docker-engine apt-get install docker-engine

参考:https://askubuntu.com/questions/793272/iptables-forward-port-error-no-chain-target-match-by-that-name

    原文作者:曹赫洋
    原文地址: https://www.jianshu.com/p/116a8fb47561
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞