安装docker-compose:安装docker-compose_安装 docker-compose-CSDN博客
安装harbor,我安装的是v2.4.3
#下载安装包
wget https://github.com/goharbor/harbor/releases/download/v2.4.3/harbor-offline-installer-v2.4.3.tgz
#解压
tar -zxvf harbor-offline-installer-v2.4.3.tgz -C /usr/local/
#更改配置文件
cd /usr/local/harbor/
cp harbor.yml.tmpl harbor.yml
vim harbor.yml
更改两处,ip、注释掉https协议,更改密码和端口(可选) ,默认用户名密码为admin/Harbor12345,默认端口为8080(有tomcat服务会冲突)
#编译/安装
./prepare
./install
安装完成后可以看到一组容器,harbor服务由多个容器组成,有问题的话大概率是某个容器启动失败,docker restart 容器ID 重启该容器即可。
[root@lgb webapps]# docker ps | grep harbor
4693ccbc2339 goharbor/harbor-jobservice:v2.4.3 "/harbor/entrypoint.…" 3 weeks ago Up 25 hours (healthy) harbor-jobservice
35e210329cb3 goharbor/nginx-photon:v2.4.3 "nginx -g 'daemon of…" 3 weeks ago Up 25 hours (healthy) 0.0.0.0:90->8080/tcp, :::90->8080/tcp nginx
a546fa60238d goharbor/harbor-core:v2.4.3 "/harbor/entrypoint.…" 3 weeks ago Up 25 hours (healthy) harbor-core
a075f81d34bc goharbor/harbor-portal:v2.4.3 "nginx -g 'daemon of…" 3 weeks ago Up 25 hours (healthy) harbor-portal
46b334a4d5f4 goharbor/registry-photon:v2.4.3 "/home/harbor/entryp…" 3 weeks ago Up 2 days (healthy) registry
c34511ab2368 goharbor/harbor-db:v2.4.3 "/docker-entrypoint.…" 3 weeks ago Up 25 hours (healthy) harbor-db
3eff6a5d2a1a goharbor/redis-photon:v2.4.3 "redis-server /etc/r…" 3 weeks ago Up 25 hours (healthy) redis
f25dbe9b5e8c goharbor/harbor-registryctl:v2.4.3 "/home/harbor/start.…" 3 weeks ago Up 25 hours (healthy) registryctl
1845cdc1aae7 goharbor/harbor-log:v2.4.3 "/bin/sh -c /usr/loc…" 3 weeks ago Up 2 days (healthy) 127.0.0.1:1514->10514/tcp harbor-log
参考:
https://www.cnblogs.com/flzidea/p/17911147.html