一、安装Harbor
准备:docker 要启动,docker-compose要安装。
下载地址:https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.4.tgz (你也可以下载更新版本)
#tar zxvf harbor-offline-installer-v1.8.4.tgz
# cd harbor
#vi harbor.yml 我只修改了主机地址为该服务器地址,以及端口8080
# cat harbor.yml |grep -v "#"|grep -v "^$" hostname: 10.10.4.85 http: port: 8080 harbor_admin_password: Harbor12345 database: password: root123 data_volume: /data clair: updaters_interval: 12 http_proxy: https_proxy: no_proxy: 127.0.0.1,localhost,core,registry jobservice: max_job_workers: 10 chart: absolute_url: disabled log: level: info rotate_count: 50 rotate_size: 200M location: /var/log/harbor _version: 1.8.0
#./prepare
#./install.sh
........... ........... ? ----Harbor has been installed and started successfully.---- Now you should be able to visit the admin portal at http://10.10.4.85. For more details, please visit https://github.com/goharbor/harbor .
二、使用Harbor
配置docker启动文件:
#vi /usr/lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd
配置docker的配置:
# cat /etc/docker/daemon.json {"registry-mirrors": ["http://295c6a59.m.daocloud.io"],"insecure-registries":["10.10.4.85:8080"]}
重启docker:
# systemctl daemon-reload
# systemctl restart docker
登录测试:
# docker login 10.10.4.85:8080
原文:https://www.cnblogs.com/zoujiaojiao/p/12449607.html