在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件)
1 | { |
注意,一定要保证该文件符合 json 规范,否则 Docker 将不能启动。
之后重新启动服务。
1 | systemctl daemon-reload |
但是在’docker pull tomcat’时出现了错误
1 | Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) |
解决办法
1 | 1.查看自己的的网卡配置文件(网关和ip是否在一个地址段)是否正确 |
参考文章
https://sheng.iteye.com/blog/2305464
https://blog.csdn.net/xxb249/article/details/79469534?utm_source=blogxgwz8
https://www.cnblogs.com/liuwt0911/articles/5803801.html