java系统找不到指定文件怎么解决
232
2022-10-30
Docker私有仓库的部署-----Harbor
一、Harbor
Harbor 是 VMware 公司开源的企业级 Docker Registry 项目:(1)Harbor 的优势:
基于角色控制;基于镜像的复制策略;支持 LDAP / AD;图像删除和垃圾收集;图形 UI;审计;RESTful API;
二、私有仓库的优点:
安装 harbor: [root@localhost abc]# tar zvxf harbor-offline-installer-v1.2.2.tgz -C /usr/local/ 安装 docker-compose: [root@localhost abc]# cp docker-compose /usr/bin/ //将docker-compose 复制到/bin/目录下,系统识别后,就可以直接使用 docker-compose命令了。
[root@localhost local]# cd harbor/ [root@localhost harbor]# ls common docker-compose.yml harbor.v1.2.2.tar.gz NOTICE docker-compose.clair.yml harbor_1_1_0_template install.sh prepare docker-compose.notary.yml harbor.cfg LICENSE upgrade [root@localhost harbor]# sh /usr/local/harbor/install.sh //开启
docker images //查看镜像 docker ps -a //查看容器 docker-compose ps //查看容器
docker login -u admin -p Harbor12345 harbor]# docker pull cirros //下载镜像 [root@localhost harbor]# docker tag cirros 127.0.0.1/myproject-kgc/cirros:v1 //镜像更换标签
[root@localhost harbor]# docker push 127.0.0.1/myproject-kgc/cirros
--insecure-registry 192.168.220.131
systemctl daemon-reload //重载 systemctl restart docker //重启
3、登录
docker login -u admin -p Harbor12345 pull 192.168.220.131/myproject-kgc/cirros:v1
[root@localhost ~]# docker pull cirros [root@localhost ~]# docker tag cirros:latest 192.168.220.131/myproject-kgc/cirros:v2 [root@localhost ~]# docker push 192.168.220.131/myproject-kgc/cirros:v2
[root@localhost ~]# docker pull nginx [root@localhost ~]# docker tag nginx:latest 192.168.220.131/myproject-kgc/nginx:v1 [root@localhost ~]# docker push 192.168.220.131/myproject-kgc/nginx:v1
三、管理私库:
[root@localhost harbor]# docker-compose down -v //关闭所有容器
[root@localhost harbor]# docker-compose up -d
[root@localhost ~]# docker logout http://192.168.220.131 [root@localhost ~]# docker login http://192.168.220.131
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~