环境
1、Centos7.3
2、Docker版本:18.03.1-ce
3、Docker-compost:1.21.2
4、Harbor:v1.5.1
下载docker-ce 我下载的18.03.1.ce
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
yum update -y
yum localinstall docker-ce-18.03.1.ce-1.el7.centos.x86_64.rpm -y
systemctl start docker
systemctl enable docker
compose下载网址
https://github.com/docker/compose/releases
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
docker-compose version 1.21.2, build a133471
harbor下载地址
https://github.com/vmware/harbor/releases
tar -zxvf harbor-offline-installer-v1.5.1.tgz
cd harbor
vim harbor.cfg 修改为本机IP地址
hostname 192.168.1.24
保存退出
执行./install 通过harbor文件里的docker-compos文件部署
如下显示代表安装完毕
Now you should be able to visit the admin portal at http://192.168.1.24.
For more details, please visit https://github.com/vmware/harbor .
查看
docker-compose ps
访问192.168.1.24
默认密码 Harbor12345 在harbor.cfg配置文件里可以修改
新建项目
vim /usr/lib/systemd/system/docker.service 添加
ExecStart=/usr/bin/dockerd --insecure-registry 192.168.1.24
systemctl daemon-reload
systemctl restart docker
docker pull nginx
docker login 192.168.1.24 输入用户名密码
默认用户名密码 admin Harbor12345
docker tag nginx 192.168.1.24/zyyang/nginx:latest
docker push 192.168.1.24/zyyang/nginx:latest
未公开的项目只有创建项目的人可见
作者:Mariana_
链接:https://www.jianshu.com/p/0df94477f802
共同学习,写下你的评论
评论加载中...
作者其他优质文章