遗留问题之--harbor容器restarting
前提,环境已经配置好,环境和软件版本不可更改
1. 资源列表
忽略CA,因为在yml文件中我选择注释掉https,后续解决问题后再添加
plus,取消注释并修改ca路径
2.harbor.yml文件
只更改了端口,避免端口冲突,https部分注释
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 81
3. 环境准备
# ./prepare
prepare base dir is set to /root/harbor
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/registry/root.crt
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
4. 安装启动
# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 18.09.0
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.22.0
[Step 2]: loading Harbor images ...
Loaded image: goharbor/harbor-jobservice:v2.6.0
Loaded image: goharbor/harbor-registryctl:v2.6.0
Loaded image: goharbor/redis-photon:v2.6.0
Loaded image: goharbor/nginx-photon:v2.6.0
Loaded image: goharbor/trivy-adapter-photon:v2.6.0
Loaded image: goharbor/prepare:v2.6.0
Loaded image: goharbor/harbor-log:v2.6.0
Loaded image: goharbor/harbor-exporter:v2.6.0
Loaded image: goharbor/harbor-portal:v2.6.0
Loaded image: goharbor/harbor-db:v2.6.0
Loaded image: goharbor/notary-signer-photon:v2.6.0
Loaded image: goharbor/chartmuseum-photon:v2.6.0
Loaded image: goharbor/harbor-core:v2.6.0
Loaded image: goharbor/registry-photon:v2.6.0
Loaded image: goharbor/notary-server-photon:v2.6.0
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /root/harbor
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 ...
Removing network harbor_harbor
[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating redis ... done
Creating registryctl ... done
Creating harbor-portal ... done
Creating harbor-db ... done
Creating registry ... done
Creating harbor-core ... done
Creating harbor-jobservice ... done
Creating nginx ... done
✔ ----Harbor has been installed and started successfully.----
5. nginx和registry一直restarting
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3388e25c9dbe goharbor/harbor-jobservice:v2.6.0 "/harbor/entrypoint.…" 27 seconds ago Up 25 seconds (health: starting) harbor-jobservice
dfde31cd78fa goharbor/nginx-photon:v2.6.0 "nginx -g 'daemon of…" 27 seconds ago Restarting (1) 7 seconds ago nginx
3b1c92cb697e goharbor/harbor-core:v2.6.0 "/harbor/entrypoint.…" 28 seconds ago Up 26 seconds (health: starting) harbor-core
cd52f073f9e3 goharbor/registry-photon:v2.6.0 "/home/harbor/entryp…" 30 seconds ago Restarting (2) 9 seconds ago registry
cdf75333a4b0 goharbor/harbor-db:v2.6.0 "/docker-entrypoint.…" 30 seconds ago Up 28 seconds (health: starting) harbor-db
314a8bdbf338 goharbor/harbor-registryctl:v2.6.0 "/home/harbor/start.…" 30 seconds ago Up 27 seconds (health: starting) registryctl
49c4ccd4fdde goharbor/harbor-portal:v2.6.0 "nginx -g 'daemon of…" 30 seconds ago Up 27 seconds (health: starting) harbor-portal
aff0ace76ba0 goharbor/redis-photon:v2.6.0 "redis-server /etc/r…" 30 seconds ago Up 28 seconds (health: starting) redis
86ad3550405b goharbor/harbor-log:v2.6.0 "/bin/sh -c /usr/loc…" 31 seconds ago Up 29 seconds (health: starting) 127.0.0.1:1514->10514/tcp harbor-log