Docker login私有仓库报错:x509: cannot validate certificate for because it doesn‘t contain any IP SANs
问题:
docker login 私有仓库时报错
[01:18:02 root@node ~]Username: adminPassword:Error response from daemon: Get https://192.168.4.69/v2/: x509: cannot validate certificate for 192.168.4.69 because it doesn't contain any IP SANs
解决办法:
1、在/etc/docker/daemon.json中添加私有仓库地址
vim /etc/docker/daemon.json
注意每条逗号相隔
2、在/usr/lib/systemd/system/docker.service中添加私有仓库地址
vim /usr/lib/systemd/system/docker.service
找到service,注释后的第一行参数最后添加--insecure-registry 私有仓库地址
3、重启docker.service
[01:31:14 root@ldy-node ~][01:31:19 root@ldy-node ~]
至此再次登录私有仓库
登录成功
转自 : https://blog.csdn.net/qq_43580215/article/details/125419497