harbor的安装及使用

文章目录

资源编排就是合理快速的分配计算资源和硬件资源,进行计算。

docker: swarm

google: kubernetes (k8s,k3s)

opensource: docker-compose

安装harbor仓库

0) 创建/root/harbor目录,cd到此目录

1) 下载harbor安装包

curl 'http://pan.itshine.cn:5080/?explorer/share/fileOut\&shareID=64h6PiQQ\&path={shareItemLink%3A64h6PiQQ}%2F工具%2Fharbor-offline-installer-v2.9.0.tgz' > './harbor-offline-installer-v2.9.0.tgz'

2)网上搜寻harbor安装的docker-compose yml文件。(github)

注意: 这个docker-compose.yml文件是安装时候生成的。

3)docker-compose up -d

admin/root :Harbor12345

具体安装过程

curl 'http://pan.itshine.cn:5080/?explorer/share/fileOut&shareID=64h6PiQQ&path=%7BshareItemLink%3A64h6PiQQ%7D%2F%E5%B7%A5%E5%85%B7%2Fharbor-offline-installer-v2.9.0.tgz' > './harbor-offline-installer-v2.9.0.tgz'
curl 'http://pan.itshine.cn:5080/?explorer/share/fileOut&shareID=64h6PiQQ&path=%7BshareItemLink%3A64h6PiQQ%7D%2Fdocker-compose-yms%2Fdocker-compose' > './docker-compose'
chmod +x docker-compose
cp docker-compose /bin/
tar zxf harbor-offline-installer-v2.9.0.tgz
cp harbor.yml.tmpl harbor.yml

使用mkcert生成证书配置如下

修改完成后直接执行脚本安装

sh install.sh

这一步时间较长,等待镜像下载完成即可。

注意,每次修改完harbor.yml都要执行 install.sh

测试

访问 https://harbor.ycjy.info:8081

使用admin,Harbor12345登录

上传

如果上传出现了错误,是说明harbor ssl证书没验证,

unauthorized: unauthorized to access repository: internal/centos-nginx, action: push: unauthorized to access repository: internal/centos-nginx, action: push

需要修改/etc/docker/daemon.json

[root@shuyang2 DOCKER]# cat /etc/docker/daemon.json
{
"registry-mirrors" : [
    "https://nexus.ycjy.info"
  ],
  "insecure-registries" : [
    "https://nexus.ycjy.info","harbor.ycjy.info:4443"
  ],
  "dns" : [ "192.168.10.19" , "8.8.8.8" ]
}
[root@sh

insecure-registries表示不安全的docker库,可以告知docker不要去报错。

这就可以了。

相关推荐
wang_book2 小时前
Gitlab学习(007 gitlab项目操作)
java·运维·git·学习·spring·gitlab
prcyang3 小时前
Docker Compose
运维·docker·容器
脚踏实地的大梦想家3 小时前
【Docker】安装全流程与配置完整镜像源(可安装 nginx)
运维·docker·容器
Zww08914 小时前
docker部署个人网页导航
运维·docker·容器
运维小白。。4 小时前
Nginx 反向代理
运维·服务器·nginx·http
PeterJXL4 小时前
Docker-compose:管理多个容器
运维·docker·容器
海王正在撒网4 小时前
用 Docker 部署 Seafile 社区版
运维·docker·容器
xuanyu225 小时前
Linux常用指令
linux·运维·人工智能
KookeeyLena55 小时前
云手机可以挂在服务器使用吗?
运维·服务器·智能手机
老汉忒cpp5 小时前
手动部署并测试内网穿透(ssh 和 nginx)
运维·服务器