harbo部署

#下载离线包安装

代理github下载地址 :  https://mirrors.chenby.cn/

输入地址下载   https://github.com/vmware/harbor/releases/download/v2.7.0/harbor-online-installer-v2.7.0.tgz

tar xf harbor-online-installer-v2.7.0.tgz

修改 harbor.yal 文件

安装 ./install

#docker添加harbo仓库

[root@centos7-test harbor]# cat /etc/docker/daemon.json


{
"registry-mirrors": ["https://registry.docker-cn.com"],
"insecure-registries":["192.168.1.31:5000"]
}

#问题现象

[root@centos7-test harbor]# docker login harbo.hfds-test.com:5000
Username: dev
Password:
Error response from daemon: Get "http://harbo.hfds-test.com:5000/v2/": dial tcp 192.168.1.31:5000: connect: connection refused

#解决办法

[root@centos7-test harbor]# pwd
/data/harbor
[root@centos7-test harbor]# vim harbor.yml

hostname: hfds-test
http:
port: 5000
external_url: http://192.168.1.31:5000    #没加端口5000就会报错
harbor_admin_password: Hfds@123

 #登录

[root@centos7-test harbor]# docker login http://192.168.1.31:5000
Username: dev
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

#docker pull nginx 报错

Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.1.1:53: no such host

[root@centos7-test harbor]# cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
#nameserver 192.168.1.1
nameserver 8.8.8.8

 

posted @ 2023-04-20 17:00  跳出圈子  阅读(30)  评论(0)    收藏  举报