harbor使用问题

docker build -t http://17.50.19.10:8089/distribute-train/distribute-train-operator:v1 .

报错:

Error response from daemon: Get "https://17.50.19.10:8089/v2/": http: server gave HTTP response to HTTPS client

invalid reference format

解决方案:

修改harbor服务器和客户端服务器上docker的daemon.json

vi /etc/docker/daemon.json
+
"insecure-registries":["17.50.19.10:8089"]

然后重启docker并启动所有docker进程

systemctl daemon-reload
systemctl restart docker
docker start $(docker ps -aq)

验证:

docker login -u admin -p Yinheng@2022== http://17.50.19.10:8089

完美解决,但invalid reference format依旧存在,尝试了多种方法,最终确定去掉http://,执行:

docker build -t 17.50.19.10:18089/distribute-train/distribute-train-operator:v1 .

问题解决,但报错:

unauthorized: project distribute-train not found: project distribute-train not found

解决方案:

在harbor系统上创建项目distribute-train,再次执行,成功

你可能感兴趣的:(docker,docker,容器,运维)