Today, build a platform on a virtual machine and execute docker-compose up -d to report an error:
✘ Network layman_default Error 0.0s
failed to create network layman_default: Error response from daemon: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-8e527ad6d691 -j RETURN: iptables: No chain/target/match by that name.
As shown in the picture:
reason
This is because the firewall made a policy when starting docker. If the container is running and the firewall is stopped, this error will be reported when operating the container. We can restart docker to solve this problem
systemctl restart docker.service
Then
docker compose up -d