CentOS

在CentOS 8 中使用 Docker 无法访问网络

Linux

在CentOS 8 中使用 Docker 无法访问网络

在CentOS 8上使用Docker时,Docker Build无法还原依赖,错误提示failure resolving xxxxxx,看起来像DNS失效无法还原出域名映射的地址。联想到在CentOS 8上安装Docker时也因为网络问题无法安装,怀疑是firewalld的原因,于是systemctl start firewalld.service停止firewalld,再service docker restart重启Docker服务后,果然就可以还原依赖了。但是机器没有防火墙简直就是裸奔,搜索后发现用firewall-cmd --zone=public --add-masquerade --permanent命令使masquerade允许通过firewall,再firewall-cmd --reload && service docker restart后,一切恢复正常. Quote * How to Install Docker on CentOS 8 * No network connectivity to/from Docker CE container on

By FatTiger