docker 镜像仓库harbor安装

1、linux安装:

K8s集群使用容器镜像仓库Harbor_k8s使用harbor-CSDN博客

2、linux安装:

清理docker:

yum remove -y docker

yum remove -y docker-compose

安装docker:

curl -fsSL https://get.docker.com/ | sh

安装harbor:

解压:

tar -xvf harbor-offline-installer-v2.7.3.tgz

在解压后的文件内执行准备工作:

[root@bogon harbor]# ./prepare 
prepare base dir is set to /home/harbor/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /data/secret/keys/secretkey
Successfully called func: create_root_cert
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir

 成功后进行安装:

[root@bogon harbor]# ./install.sh 

[Step 0]: checking if docker is installed ...

Note: docker version: 25.0.1

[Step 1]: checking docker-compose is installed ...

Note: Docker Compose version v2.24.2

[Step 2]: loading Harbor images ...
25e10fc3a41f: Loading layer [==================================================>]  84.62MB/84.62MB
707d80794616: Loading layer [==================================================>]  3.072kB/3.072kB
cc0dd44f1c1b: Loading layer [==================================================>]   59.9kB/59.9kB
6a0028d62d5f: Loading layer [==================================================>]  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v2.7.3
125cd1fbde6f: Loading layer [==================================================>]  81.13MB/81.13MB
Loaded image: goharbor/nginx-photon:v2.7.3
94ee5882939c: Loading layer [==================================================>]  6.172MB/6.172MB
224b187e3267: Loading layer [==================================================>]  4.096kB/4.096kB
21347603d464: Loading layer [==================================================>]  3.072kB/3.072kB
1bfe8edb05af: Loading layer [==================================================>]  17.42MB/17.42MB
2d4b1ca7beca: Loading layer [==================================================>]  18.21MB/18.21MB
Loaded image: goharbor/registry-photon:v2.7.3
Loaded image: goharbor/prepare:v2.7.3
490b84a472cb: Loading layer [==================================================>]  92.63MB/92.63MB
956cf090fd93: Loading layer [==================================================>]  3.584kB/3.584kB
bc3e5ebff193: Loading layer [==================================================>]  3.072kB/3.072kB
8a3c31fc6b9d: Loading layer [==================================================>]   2.56kB/2.56kB
256c37dc2da0: Loading layer [==================================================>]  3.072kB/3.072kB
0bc110c134d9: Loading layer [==================================================>]  3.584kB/3.584kB
1a2b7eb0bce3: Loading layer [==================================================>]  20.48kB/20.48kB
Loaded image: goharbor/harbor-log:v2.7.3
aa4506dc1169: Loading layer [==================================================>]  6.699MB/6.699MB
09623f049b56: Loading layer [==================================================>]  4.096kB/4.096kB
4edac4e77cfe: Loading layer [==================================================>]  3.072kB/3.072kB
c395c80b9425: Loading layer [==================================================>]  195.5MB/195.5MB
02e606a4b8f4: Loading layer [==================================================>]  13.84MB/13.84MB
7d153d89269f: Loading layer [==================================================>]  210.1MB/210.1MB
Loaded image: goharbor/trivy-adapter-photon:v2.7.3
d7eeed0e02de: Loading layer [==================================================>]  9.188MB/9.188MB
432cb61d5a5f: Loading layer [==================================================>]  3.584kB/3.584kB
05d96b3e1cfd: Loading layer [==================================================>]   2.56kB/2.56kB
63f5df87403e: Loading layer [==================================================>]  107.4MB/107.4MB
bba8deb9640d: Loading layer [==================================================>]  108.2MB/108.2MB
Loaded image: goharbor/harbor-jobservice:v2.7.3
18679c90275a: Loading layer [==================================================>]  9.188MB/9.188MB
3836bb8307f3: Loading layer [==================================================>]  25.64MB/25.64MB
65e2995d5890: Loading layer [==================================================>]  4.608kB/4.608kB
fc4d2f7b2247: Loading layer [==================================================>]  26.43MB/26.43MB
Loaded image: goharbor/harbor-exporter:v2.7.3
b09f52cb79db: Loading layer [==================================================>]  81.13MB/81.13MB
0de0f3a4a968: Loading layer [==================================================>]  6.145MB/6.145MB
1cc5e2066a05: Loading layer [==================================================>]  1.249MB/1.249MB
c1831e1a3dc1: Loading layer [==================================================>]  1.194MB/1.194MB
Loaded image: goharbor/harbor-portal:v2.7.3
f3f8610eb9a2: Loading layer [==================================================>]  6.172MB/6.172MB
ca1cbfc87101: Loading layer [==================================================>]  4.096kB/4.096kB
eba26443c519: Loading layer [==================================================>]  17.42MB/17.42MB
6fa94224f8e1: Loading layer [==================================================>]  3.072kB/3.072kB
a69bd354a162: Loading layer [==================================================>]  30.79MB/30.79MB
d99caf440432: Loading layer [==================================================>]     49MB/49MB
Loaded image: goharbor/harbor-registryctl:v2.7.3
754ee4f20a87: Loading layer [==================================================>]  6.167MB/6.167MB
488f9d4f202f: Loading layer [==================================================>]      9MB/9MB
882839d9a43a: Loading layer [==================================================>]  15.88MB/15.88MB
af49868e6a11: Loading layer [==================================================>]  29.29MB/29.29MB
1cfdd6a4b121: Loading layer [==================================================>]  22.02kB/22.02kB
75d68d3995d0: Loading layer [==================================================>]  15.88MB/15.88MB
Loaded image: goharbor/notary-server-photon:v2.7.3
ed19854c6185: Loading layer [==================================================>]  6.167MB/6.167MB
b7da3ca1163f: Loading layer [==================================================>]      9MB/9MB
45cf7c014c38: Loading layer [==================================================>]  14.47MB/14.47MB
add25e0bd8f4: Loading layer [==================================================>]  29.29MB/29.29MB
f2649a2e9990: Loading layer [==================================================>]  22.02kB/22.02kB
e7c431df2036: Loading layer [==================================================>]  14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.7.3
c8f10d7f5058: Loading layer [==================================================>]  6.171MB/6.171MB
6f9b2758eecb: Loading layer [==================================================>]  92.57MB/92.57MB
88bd18f462c9: Loading layer [==================================================>]  3.072kB/3.072kB
7b69da1a87e0: Loading layer [==================================================>]  4.096kB/4.096kB
f5c7e5bf0c87: Loading layer [==================================================>]  93.36MB/93.36MB
Loaded image: goharbor/chartmuseum-photon:v2.7.3
6f1f252a68f7: Loading layer [==================================================>]  9.188MB/9.188MB
e4b1c8283200: Loading layer [==================================================>]  3.584kB/3.584kB
ac8a6728aacb: Loading layer [==================================================>]   2.56kB/2.56kB
d67239aceb04: Loading layer [==================================================>]  88.15MB/88.15MB
52d82b477465: Loading layer [==================================================>]  5.632kB/5.632kB
0b581d8aa42c: Loading layer [==================================================>]    108kB/108kB
7cc5d92bae9b: Loading layer [==================================================>]  44.03kB/44.03kB
ee1a44c8660b: Loading layer [==================================================>]   89.1MB/89.1MB
c767cebcac07: Loading layer [==================================================>]   2.56kB/2.56kB
Loaded image: goharbor/harbor-core:v2.7.3
944e9bc00675: Loading layer [==================================================>]  115.9MB/115.9MB
5d1731395a1c: Loading layer [==================================================>]  25.23MB/25.23MB
9ee31133f5f7: Loading layer [==================================================>]   5.12kB/5.12kB
45723f0ecfeb: Loading layer [==================================================>]  6.144kB/6.144kB
ea96c9e2b3d5: Loading layer [==================================================>]  3.072kB/3.072kB
16902662913c: Loading layer [==================================================>]  2.048kB/2.048kB
ed454e9f0c62: Loading layer [==================================================>]   2.56kB/2.56kB
c3ad93bf894b: Loading layer [==================================================>]   2.56kB/2.56kB
878f11bc8b45: Loading layer [==================================================>]   2.56kB/2.56kB
aee3d5349c90: Loading layer [==================================================>]  9.728kB/9.728kB
Loaded image: goharbor/harbor-db:v2.7.3


[Step 3]: preparing environment ...

[Step 4]: preparing harbor configs ...
prepare base dir is set to /home/harbor/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Clearing the configuration file: /config/portal/nginx.conf
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/registry/passwd
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
loaded secret from file: /data/secret/keys/secretkey
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir


Note: stopping existing Harbor instance ...


[Step 5]: starting Harbor ...
[+] Running 9/10
 ⠙ Network harbor_harbor        Created                                                                                                      23.1s 
 ✔ Container harbor-log         Started                                                                                                       7.5s 
 ✔ Container registryctl        Started                                                                                                      12.7s 
 ✔ Container registry           Started                                                                                                      10.2s 
 ✔ Container redis              Started                                                                                                      16.0s 
 ✔ Container harbor-portal      Started                                                                                                      14.2s 
 ✔ Container harbor-db          Started                                                                                                      13.7s 
 ✔ Container harbor-core        Started                                                                                                      15.1s 
 ✔ Container nginx              Started                                                                                                      17.8s 
 ✔ Container harbor-jobservice  Started                                                                                                      17.0s 
✔ ----Harbor has been installed and started successfully.----

登录:

  • 10
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值