文章目录
- 1. 现象
- 2. 解决方案
- 3. 重新登陆
1. 现象
[root@localhost harbor]# docker login 192.168.92.129
Username: admin
Password:
Error response from daemon: Get "https://192.168.92.129/v2/": x509: cannot validate certificate for 192.168.92.129 because it doesn't contain any IP SANs
[root@localhost harbor]#
2. 解决方案
1.打开终端,su root 输入密码
2.打开 vim /etc/docker/daemon.json
(若没有自行创建)
vim /etc/docker/daemon.json
添加内容
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},"insecure-registries":["192.168.92.129"]
}
- 重启一下docker:
systemctl daemon-reload
systemctl restart docker
- 下线
cd /app/harbor
docker-compose down -v
- 重新部署上线
docker-compose up -d
3. 重新登陆
docker login 192.168.92.129