How Do You Troubleshoot the Docker problem “Error response from daemon: Cannot start container”?

Problem scenario
Sometimes you try to start a Docker container but there is a problem.  For example you try:
docker start <containerID>
But you receive this: "Error response from daemon: Cannot start container <containerID>: failed to create endpoint <name> on network bridge: ip tables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination x.x.x.x:80 ! -i docker0: iptables: No chain/target/match by that name."

Solution
cd /var/lib/docker/network/files/
ls -lh > /tmp/forposterity
mkdir /tmp/backupdir
mv /var/lib/docker/network/files/ /tmp/backupdir
systemctl restart docker
 #change this command depending on your distribution and version of Linux to restart Docker services

Leave a comment

Your email address will not be published.