美文网首页
harbor容器私库搭建

harbor容器私库搭建

作者: 卫彬TM | 来源:发表于2020-05-12 19:56 被阅读0次

下载离线安装包

harbor-offline-installer-v1.10.2.tgz

安装

解压:tar xzvf harbor-offline-installer-v1.10.2.tgz
修改进入解压的harbor目录,修改harbor.yml文件hostname、admin_password、平台访问的端口,我这边使用18801


image.png

执行:sh install.sh

配置

vi /etc/docker/daemon.json
添加"insecure-registries": ["10.67.40.121:18801"],地址,是可以使用http访问

{
  "registry-mirrors": ["https://d0fx7aol.mirror.aliyuncs.com"],
  "insecure-registries": ["10.67.40.121:18801"],
  "live-restore": true  
}

systemctl daemon-reload
systemctl restart docker
docker login 10.67.40.121:18801 输入账密:admin/Harbor12345
PS:一定要在web页面上可以登录的才能成功
测试push镜像:docker tag hello-world:latest 10.67.40.121:18801/library/hello-world:1.1
docker push 10.67.40.121:18801/library/hello-world:1.1

其他节点配置

vi /etc/docker/daemon.json
添加"insecure-registries": ["10.67.40.121:18801"],地址,是可以使用http访问

{
    "insecure-registries": ["10.67.40.121:18801"],
}

systemctl daemon-reload
systemctl restart docker
docker login 10.67.40.121:18801 输入账密:admin/Harbor12345
docker tag hello-world:latest 10.67.40.121:18801/library/hello-world:1.2
docker push 10.67.40.121:18801/library/hello-world:1.2
docker pull 10.67.40.121:18801/library/hello-world:1.1
docker images 查看


image.png

相关文章

网友评论

      本文标题:harbor容器私库搭建

      本文链接:https://www.haomeiwen.com/subject/ajuinhtx.html