docker仓库harbor
一、安装docker和docker-compose https://www.cnblogs.com/konglingxi/p/12378295.html https://www.cnblogs.com/konglingxi/p/12497347.html 二、docker国内镜像加速 https://www.cnblogs.com/konglingxi/p/15293401.html 三、下载harbor cd /data/ wget https://yanfayun.oss-cn-shenzhen.aliyuncs.com/app/690656240656711680/graph/harbor-offline-installer-v2.3.2.tgz 四、解压harbor tar -zxvf harbor-offline-installer-v2.3.2.tgz 五、配置harbor # hostname为自己的ip或者域名 # data_volume为数据保存目录 # database为数据库相关配置 # harbor_admin_password是账号密码 # 不需要https时请注释相关配置 cd harbor cp harbor.yml.tmpl harbor.yml vim harbor.yml 六、启动harbor ./prepare ./install.sh 七、登录harbor页面测试,以下ip换成自己的 1.在web页面创建项目harbor 2.docker tag goharbor/nginx-photon:v2.3.2 192.168.138.130:80/harbor/nginx:latest 3.docker login报错dial tcp 192.168.138.130:443: connect: connection refused,vim /etc/docker/daemon.json加入 "insecure-registries": ["192.168.138.130:80"] 4.重启docker systemctl daemon-reload systemctl restart docker 5.重启harbor cd harbor docker-compose down -v docker-compose up -d 6.docker login 192.168.138.130:80,并且输入账号密码admin、Harbor12345 7.docker push 192.168.138.130:80/harbor/nginx:latest 8.刷新harbor web页面查看推送情况 9.拉取harbor中镜像 docker rmi 192.168.138.130:80/harbor/nginx:latest docker pull 192.168.138.130:80/harbor/nginx:latest