docker Harbor
2019-10-28 本文已影响0人
胸口砕大石
安装docker-compose
https://www.jianshu.com/p/6cd6f71a915f
下载Harbor在线安装包
$ wget https://storage.googleapis.com/harbor-releases/release-1.9.0/harbor-online-installer-v1.9.1.tgz
修改harbor.yml配置https
...................
# https related config
https:
# # https port for harbor, default is 443
port: 443
# # The path of cert and key files for nginx
certificate: /home/ssl/server.crt
private_key: /home/ssl/server.key
.......................
执行脚本
./packages/harbor/prepare
./packages/harbor/install.sh
第一次执行比较慢 ,我是多次执行比较快,输出也有区别
[Step 0]: checking installation environment ...
Note: docker version: 19.03.4
Note: docker-compose version: 1.24.1
[Step 1]: preparing environment ...
prepare base dir is set to /home/packages/harbor
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/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /secret/keys/secretkey
Generated certificate, key file: /secret/core/private_key.pem, cert file: /secret/registry/root.crt
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
[Step 2]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating registryctl ... done
Creating registry ... done
Creating harbor-portal ... done
Creating harbor-db ... done
Creating redis ... done
Creating harbor-core ... done
Creating harbor-jobservice ... done
Creating nginx ... done
✔ ----Harbor has been installed and started successfully.----
Now you should be able to visit the admin portal at https://192.168.7.80.
For more details, please visit https://github.com/goharbor/harbor .
访问URL
https://192.168.7.80.
访问不了 还以缓存问题 删除common文件夹再试就可以了 .
客户端登录 如果此处发生如下错误:
The push refers to repository [192.168.7.80/sms/nginx]
Get https://192.168.7.80/v2/: x509: cannot validate certificate for 192.168.7.80 because it doesn't contain any IP SANs
则需要将/usr/lib/systemd/system/docker.service文件中ExecStart值修改为如下形式,即:
ExecStart=/usr/bin/dockerd --insecure-registry 192.168.7.80
目前问题是admin可以登录 新建用户登录提示 ,有大神有解决办法 请告知在下.
Error response from daemon: Get https://192.168.7.80/v2/: unauthorized: authentication required