center os 7 docker 映射 端口 时端口报错  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 00 --d

    xiaoxiao2023-06-30  173

    docker: Error response from daemon: driver failed programming external connectivity on endpoint unruffled_wilbur (27aff6f6ef0280b6fd4b43f5ef325c5346526195cbd2cf359e2065f96077d702):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8888 -j DNAT --to-destination 172.17.0.2:8080 ! -i docker0: iptables: No chain/target/match by that name.  (exit status 1)).

     

    网上查找发现,可能是网络问造成

    首先先验证docker容器内部网络是否能ping通宿主机

    如果能ping通,即可通过重建docker0网络恢复

    先停掉宿主机上运行的docker容器,然后执行以下命令

    在宿主机执行:

    pkill docker iptables -t nat -F ifconfig docker0 down brctl delbr docker0 docker -d 最后重启 docker就行
    最新回复(0)