在线搭建harbor私有仓库,报错 Get https://192.168.1.80/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决方案,在 /etc/docker/daemon.json,#添加 "insecure-registries": ["192.168.1.80"],harbor仓库地址
vim /etc/docker/daemon.json
#添加 "insecure-registries": ["192.168.1.80"],harbor仓库地址
{
"registry-mirrors": ["https://l3l1rswy.mirror.aliyuncs.com"],
"insecure-registries": ["192.168.1.80"]
}
docker login
docker push 仓库名/项目名/镜像名:tag
[root@nathan harbor]# docker login 192.168.1.80
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@nathan harbor]# docker push 192.168.1.80/library/python:3.7