docker异常:Error response from daemon: Get https://harbor/service/token: no such host

当从docker harbor私服拉取镜像时,报如下错误

Error response from daemon: Get https://10.10.8.1xx/v2/test/tomcat/manifests/8.5.57-jdk1.8.0_65: 
Get https://harbor/service/token?scope=repository%3Atest%2Ftomcat%3Apull&service=harbor-registry: 
dial tcp: lookup harbor on 10.169.169.1xx:53: no such host

 因为在拉取镜像时会调用harbor服务接口,这里因找不到harbor域名报错,在hosts文件中增加域名映射即可

vi /etc/hosts
增加一行
10.10.8.1xx  harbor

 

 

 

你可能感兴趣的:(docker,docker)