1、安装Docker之后,下载不了镜像,错误为
[root@localhost ~]# docker run hello-world Unable to find p_w_picpath 'hello-world:latest' locally Pulling repository docker.io/library/hello-world docker: Get https://registry-1.docker.io/v1/repositories/library/hello-world/tags/latest: dial tcp: lookup registry-1.docker.io on 172.16.1.2:53: no such host. See 'docker run --help'.
解决办法,找个合适的***工具.
2、CentOS7防火墙问题,不能使用service控制iptables。 需要安装iptables.services。
3、Docker运行的容器,不能访问外网。需要在主机上设置NAT规则。
iptables -t nat -A POSTROUTING -s 172.17.0.0/16 -j SNAT --to 172.16.1.70 iptables -A FORWARD -s 172.17.0.0/16 -j ACCEPT iptables -A FORWARD -d 172.17.0.0/16 -j ACCEPT