Private repository for installing Docker containers for K8S cluster installation
Steps to install a private warehouse on the operation and maintenance host cd / optopt] # mkdir srcopt] # cd src/# can be downloaded from this address You can also directly use my software package https://github.com/goharbor/harbor/releases/tag/v1.8.3src]# tar xf harbor-offline-installer-v1.8.3.tgz-C / opt/src] # cd / opt/opt] # mv harbor/ harbor-v1.8.3opt] # ln-s / opt/harbor-v1.8.3/ / opt/harboropt] # cd harborharbor] # llharbor] # vi harbor.yml # to modify the harbor file Content hostname: test-harbor.cedarhd.comhttp: port: 180 # modify the default port NGINX reverse data_volume: / data/harborlocation: / data/harbor/logsharbor] # mkdir-p / data/harbor/logsharbor] # yum install docker-compose- y # harbor dependent docer-compose components will be installed later to run harbor] # rpm-qa docker-compose# out: docker-compose-1.18.0-4.el7.noarchharbor] #. / install.sh # install and run harborharbor] # docker-compose ps # install the current Running container process harbor] # docker ps-a [root@test-operator certs] # docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESa5b3eb804709 goharbor/nginx-photon:v1.8.3 "nginx- g 'daemon of..." 2 days ago Up 47 hours (healthy) 0.0.0.0 healthy 180-> 80/tcp nginx84b61a9d364b goharbor/harbor-jobservice:v1.8.3 "/ harbor/start.sh" 2 days ago Up 47 hours harbor-jobservice9d6db31fdaa6 goharbor/harbor-portal:v1.8.3 "nginx-g'daemon of..." 2 days ago Up 47 hours (healthy) 80/tcp harbor-portal1b6169cd0b99 goharbor/harbor-core:v1.8.3 "/ harbor/start.sh" 2 days ago Up 47 hours (healthy) harbor-corecd132bba509a goharbor/harbor-db:v1.8.3 "/ entrypoint.sh post..." 2 days ago Up 47 hours (healthy) 5432/tcp harbor-db9708d7e2ed19 goharbor/redis-photon:v1.8.3 "docker-entrypoint.s …" 2 days ago Up 47 hours 6379/tcp redis293e1726014a goharbor/registry-photon:v2.7.1-patch-2819-v1.8.3 "/ entrypoint.sh / etc …" 2 days ago Up 47 hours (healthy) 5000/tcp registry4bfc311f4858 goharbor/harbor-registryctl:v1.8.3 "/ harbor/start.sh" 2 days ago Up 47 hours (healthy) registryctl80a12b72f589 goharbor/harbor-log:v1.8.3 "/ bin/sh-c / usr/loc …" 2 days ago Up 47 hours (healthy) 127.0.0.1 hours 1514-> 10514/tcp harbor-logharbor] # yum install nginx-y # install NGINX reverse proxy to harbor180 port harbor] # vi / etc/nginx/conf.d/harbor.od.com.confserver {listen 80; server_name harbor.od.com; client_max_body_size 1000m; location / {proxy_pass http://127.0.0.1:180; }} harbor] # nginx-tharbor] # systemctl start nginxharbor] # systemctl enable nginx
2. Push an image to harbor private warehouse harbor] # docker pull nginx:1.7.9harbor] # docker images | grep 1.7.9harbor] # docker tag 84581e99d807 test-harbor.cedarhd.com/public/nginx:v1.7.9harbor] # docker login test-harbor.cedarhd.com account: admin password: Harbor12345200 harbor] # docker push test-harbor.cedarhd.com/public/nginx:v1.7.9