Docker创建Harbor 03

Harbor

终端安装
下载地址:https://github.com/vmware/harbor/releases
安装文档:https://github.com/vmware/harbor/blob/master/docs/installation_guide.md

下载
推荐下载这种格式 Harbor offline installer
下载完之后放在/usr/local/src下面解压
[root@Centos7]#tar xvf harbor.v1.7.0.tar.gz
[root@Centos7 harbor]#vim harbor.cfg
hostname = 192.168.41.101    #我写的是本地ip
harbor_admin_password = 123456
解决依赖关系
1.安装docker 合适的版本
2.第一种安装  docker-compose   #yum install docker-compose && systemctl start docker 
   第二种 yum install python-pip  && pip install  docker-compose  && docker-compose start  #优势比yum的新


安装
[root@Centos7 harbor]#./install.sh 
[root@Centos7 harbor]#docker-compose version    #查看版本
[root@Centos7 harbor]#docker-compose restart
如果需要更新
[root@Centos7 harbor]#./prepare 
之后登陆对应的网址就可以了。
web管理
输入用户名密码 admin 123456
新建项目  helloworld  选择公开

开启授权 在其他服务器上
#dockerd --help查看帮助
 vim /lib/systemd/system/docker.service
 14 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry 192.168.41.101 --insecure-registry 192.168.41.102
 [root@Docker hello]#systemctl daemon-reload
 [root@Docker hello]#systemctl restart docker 


确认状态已经开启
[root@Docker hello]#ps -ef | grep docker 
root      26079      1 20 14:43 ?        00:00:06 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --insecure-registry 192.168.41.101 --insecure-registry 192.168.41.102


测试登陆
docker login 192.168.41.102
username admin
passwod 123456


测试传输
#新建一个镜像
docker build -t 192.168.41.102/helloworld/hello:v1     #helloworld 是在web界面创建的项目名。

#传输镜像
docker  push 192.168.41.102/helloworld/hello:v1

#验证
此时web界面已经产生传输的数据
docker  pull 192.168.41.102/helloworld/hello:v1    #换一台电脑下载。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值