docker 推送镜像到Harbor错误修改

Error response from daemon: Get https://192.168.160.130/v2/: dial tcp 192.168.160.130:443: connect: connection refused

 

 修改本机Host的/etc/docker/daemon.json 添加"insecure-registries": ["192.168.160.130"]  Harbor服务器ip

{
"registry-mirrors":[
"https://dockerhub.azk8s.cn",
"https://reg-mirror.qiniu.com"
],
"insecure-registries": ["192.168.160.130"]
}

 

重启生效

systemctl daemon-reload

systemctl restart docker

 

Jenkins配置远程访问Harbor

Harbor配置在另一台虚拟机

同样要加入

修改本机Host的/etc/docker/daemon.json 添加"insecure-registries": ["192.168.160.130"]  Harbor服务器ip

{
"registry-mirrors":[
"https://dockerhub.azk8s.cn",
"https://reg-mirror.qiniu.com"
],
"insecure-registries": ["192.168.160.130"]
}

 

/usr/lib/systemd/system/docker.service

[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd://  -H tcp://0.0.0.0:2375  --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always

posted @ 2019-10-21 17:03  在路上的白羊  阅读(2094)  评论(0编辑  收藏  举报