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不要去报错。

这就可以了。

相关推荐
likfishdn9 分钟前
Linux的文件与目录管理
linux·运维·服务器
chian-ocean29 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=30 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
若云止水40 分钟前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_init_cycle 函数 - 详解(4)
数据库·nginx·ubuntu
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
北京耐用通信1 小时前
航空装配自动化神器Ethercat转profient网关搭配机器人精准控制
运维·机器人·自动化
吃汤圆的抹香鲸2 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
崔lc4 小时前
linux中安装部署Jenkins,成功构建springboot项目详细教程
运维·jenkins
浪九天4 小时前
Nginx系列05(负载均衡、动静分离)
nginx·运维开发·持续部署
luojiaao4 小时前
【Jenkins】个人向-Jenkinsfile如何写
运维·jenkins