执行docker pull 1.2.3.4:5000私有仓库,遇到如下问题:
Using default tag: latest
Trying to pull repository 1.2.3.4:5000/centos ...
Get https://1.2.3.4:5000/v1/_ping: http: server gave HTTP response to HTTPS client
解决办法:
在”/etc/docker/“目录下,创建”daemon.json“文件。在文件中写入:
{
"insecure-registries": [
"1.2.3.4:5000"
]
}
//多个私服写法,逗号分隔即可
{
"insecure-registries": [
"1.2.3.4:5000",
"1.2.3.5:5000"
]
}
保存退出后,重启docker
systemctl restart docker