Ubuntu安装了docker ce,版本号为:

# docker -v
Docker version 18.09.3, build 774a1f4

执行docker pull过程中报错:

# docker pull xxx.xxx.xxx:5000/ubuntu/18.04/myimages:latest
Error response from daemon: Get https://xxx.xxx.xxx:5000/v2/: http: server gave HTTP response to HTTPS client

解决方法:在/etc/docker/daemon.json文件中新增一行"insecure-registries":["xxx.xxx.xxx:5000"],没有则新建此文件,重启docker服务

# cat daemon.json 
{
  "insecure-registries":["xxx.xxx.xxx:5000"],
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ]
}
# service docker restart

参考:https://www.cnblogs.com/lkun/p/7990466.html

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐