浏览数:
744
[root@node3 tomcat]# find / -name docker.service -type f
/usr/lib/systemd/system/docker.service
vim /usr/lib/systemd/system/docker.service
#添加--insecure-registry=mysql.gift
#mysql.gift 是绑定hosts指向内网的一个harbor服务器
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry=mysql.gift
[root@node3 tomcat]# systemctl daemon-reload
[root@node3 tomcat]# systemctl restart docker
#查看已经生效
[root@node3 tomcat]# ps aux|grep docker
root 9866 3.6 0.8 684740 71120 ? Ssl 12:43 0:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry=mysql.gift
root 10012 0.0 0.0 112708 980 pts/1 S+ 12:43 0:00 grep --color=auto docker
# 测试
docker login mysql.gift