When starting the Docker container, an error message is reported: docker: Error response from daemon: driver programming failed external connectivity on..

Problem Description

When starting a Docker container on a Linux system, the error docker: Error response from daemon: driver failed programming external connectivity on endpoint lucid_banach (an error occurs when port mapping or starting a container): (iptables failed: iptables --wait -t nat -A DOCKER - p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:8080 ! -i docker0: iptables: No chain/target/match by that name).
(exit status 1)).

docker: Error response from daemon: driver failed programming external connectivity on endpoint lucid_banach(端口映射或启动容器时报错): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:8080 ! -i docker0: iptables: No chain/target/match by that name).
(exit status 1)).

Cause Analysis:

After starting Docker, and then operating the firewalld, the above error will occur. When firewalld starts or restarts, the Docker rules will be removed from iptables, affecting the normal work of Docker.


solution:

Root user input command:

systemctl restart docker

Restart the docker service to regenerate the custom chain DOCKER.

For a more detailed explanation, please refer to the following link. This article is only a quick solution and is for reference only.

Error when starting Docker container in Linux: Error response from daemon: driver failed programming external connectivity

Guess you like

Origin blog.csdn.net/qq_39691492/article/details/125006600