在执行docker-compose up -d命令时报如下错误
Creating network "docker_default" with the default driver
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-e50975111d95 -j RETURN: iptables: No chain/target/match by that name.
(exit status 1))
出现这个错误原因是在ubuntu20.04安装postgresql后无法访问(防火墙没有开通5432端口),直接将防火墙关闭了,然后再启动docker镜像时就报了上面的问题,解决这个问题只需重启docker即可:
systemctl restart docker
参考文章: