7、配置开机自启:
/usr/local/sbin/docker-compose -f /data/software/harbor/docker-compose.yml up -d
文章插图
8、设置权限
chmod +x /etc/rc.local /etc/rc.d/rc.local
9、尝试登陆harbor文章插图
10、命令行登陆
[root@zabbix 15:08:00/data/software/harbor]# docker login 172.17.0.100:5000Username: adminPassword:Login Succeeded[root@zabbix 15:08:57/data/software/harbor]#
三、测试上传和下载1、新建一个项目目录:文章插图
文章插图
文章插图
文章插图
2、我以nginx为例进行推送到harbor上:
[root@zabbix 16:45:33/data/software/harbor]# docker image ls | grep nginxnginxlatest605c77e624dd2 months ago141MBgoharbor/nginx-photonv2.4.178aad8c8ef412 months ago45.7MB[root@zabbix 16:45:42/data/software/harbor]# docker tag nginx:latest 172.17.0.100:5000/test/nginx1.8:v1[root@zabbix 16:59:00/data/software/harbor]# docker image ls | grep nginx172.17.0.100:5000/test/nginx1.8v1605c77e624dd2 months ago141MBnginxlatest605c77e624dd2 months ago141MBgoharbor/nginx-photonv2.4.178aad8c8ef412 months ago45.7MB[root@zabbix 16:59:04/data/software/harbor]# docker push 172.17.0.100:5000/test/nginx1.8:v1 The push refers to repository [172.17.0.100:5000/test/nginx1.8]d874fd2bc83b: Pushed 32ce5f6a5106: Pushed f1db227348d0: Pushed b8d6e692a25e: Pushed e379e8aedd4d: Pushed 2edcec3590a4: Pushed v1: digest: sha256:ee89b00528ff4f02f2405e4ee221743ebc3f8e8dd0bfd5c4c20a2fa2aaa7ede3 size: 1570[root@zabbix 16:59:25/data/software/harbor]#
3、查看镜像仓库,可以看到多了一个镜像文章插图
4、镜像拉取(镜像下载)
[root@zabbix 16:59:25/data/software/harbor]# docker image rm 172.17.0.100:5000/test/nginx1.8:v1 Untagged: 172.17.0.100:5000/test/nginx1.8:v1Untagged: 172.17.0.100:5000/test/nginx1.8@sha256:ee89b00528ff4f02f2405e4ee221743ebc3f8e8dd0bfd5c4c20a2fa2aaa7ede3 [root@zabbix 17:01:15/data/software/harbor]# docker image ls | grep nginxnginxlatest605c77e624dd2 months ago141MBgoharbor/nginx-photonv2.4.178aad8c8ef412 months ago45.7MB [root@zabbix 17:02:07/data/software/harbor]# docker pull 172.17.0.100:5000/test/nginx1.8:v1v1: Pulling from test/nginx1.8Digest: sha256:ee89b00528ff4f02f2405e4ee221743ebc3f8e8dd0bfd5c4c20a2fa2aaa7ede3Status: Downloaded newer image for 172.17.0.100:5000/test/nginx1.8:v1172.17.0.100:5000/test/nginx1.8:v1 [root@zabbix 17:02:12/data/software/harbor]# docker image ls | grep nginx172.17.0.100:5000/test/nginx1.8v1605c77e624dd2 months ago141MBnginxlatest605c77e624dd2 months ago141MBgoharbor/nginx-photonv2.4.178aad8c8ef412 months ago45.7MB[root@zabbix 17:02:16/data/software/harbor]#
至此,harbor部署完毕知识补充:1、如果以后修改了harbor.yml文件,那么先停止使用docker-compose down,再去修改harbor.yml文件,重新启动部署 ./install.sh
2、正常启动harbor启动:
docker-compose up -d
3、未修改配置文件,重启Harbor命令:docker-compose start | stop | restart原文链接:
https://blog.csdn.net/moyuanbomo/article/details/123378825
【harbor安装】
推荐阅读
- centos 7.9 安装配置mysql5.7
- 忻州|办公室安装午睡盒,看似方便员工休息,却得站着睡觉
- Linux下载及安装jdk1.8
- 版本覆盖安装 C#上位机程序打包安装文件
- 怎么退税申报?
- 空调|不开空调就能降温!济南试行夏季集中供冷:无需额外安装设备
- 微软|Windows Server新版25158发布!ISO镜像免费下载:激活序列号公布
- linux系统安装mysql提示初始化失败怎么处理?
- Cygwin类似unix环境简介及其下载安装卸载
- centos7离线升级openssh,漏洞修复