LINUX

harbor镜像仓库安装

harbor镜像仓库安装操作流程


一、下载地址
https://github.com/goharbor/harbor/releases/tag/v2.7.0

二、下载的文件上传到服务器

三、解压文件

tar zxf harbor-offline-installer-v2.7.0.tgz

四、设置配置文件

cd  harbor  cp harbor.yml.tmpl harbor.yml

五、安装

./install.sh

六、设置开机启动

vim /etc/rc.localdocker-compose -f /harbor安装的位置/docker-compose.yml up -d

七、设置权限

chmod +x /etc/rc.local /etc/rc.d/rc.local

八、尝试登陆harbor新建项目



九、我以nginx为例进行推送到harbor上

docker tag nginx:latest 192.168.227.170:8050/test/nginx1.8:v1
docker push 192.168.227.170:8050/test/nginx1.8:v1

十、常见的问题

1.docker版本太低

Need to upgrade docker package to 17.06.0+.
2.升级docker版本
rpm -qa | grep docker
3.卸载对应docker软件
yum remove 卸载软件第2不查出来的
4.使用curl升级到最新版
curl -fsSL https://get.docker.com/ | sh
5.重启
systemctl restart docker 

2.docker错误unauthorized: unauthorized to access repository的可能原因

sudo docker login 地址 -u 用户名
密码

3.无法推送仓库Harbor:Http: server gave HTTP response to HTTPS client & Get

 vim  /etc/docker/daemon.json    
{
  "insecure-registries":["IP地址:端口"]
}
(0)
分享:

本文由:xiaoshu.168 作者:xiaoshu611发表,转载请注明来源!

标签:

相关阅读