docker search tomcat报错:
Error response from daemon: Get https://index.docker.io/v1/search?q=tomcat&n=25: net/http: TLS handshake timeout
docker pull tomcat报错:
Error response from daemon: Get https://registry-1.docker.io/v2/library/tomcat/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Ftomcat%3Apull&service=registry.docker.io: net/http: TLS handshake timeout
网上能搜到的办法基本上都试了,基本上都不管用。
最后乱打乱撞就好使了。
- 修改/etc/default/docker
// 修改这一行
# DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
// 为
DOCKER_OPTS="--dns 114.114.114.114 --dns 114.114.115.115"
- 修改/etc/docker/daemon.json,如果daemon.json文件不存在,就创建。
{
"registry-mirrors":[
"http://aad0405c.m.daocloud.io",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn"
]
}
网友评论