系统相关
首页 > 系统相关> > Harbor镜像仓库搭建及故障(ubuntu1804)

Harbor镜像仓库搭建及故障(ubuntu1804)

作者:互联网

前置条件需要docker-compose 1.18+

安装docker-compose 1.27

sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

1. Github下载Harbor

下载并解压

wget https://github.com/goharbor/harbor/releases/download/v2.2.0/harbor-offline-installer-v2.2.0.tgz
tar -xf harbor-offline-installer-v2.2.0.tgz

2. 修改harbor.yml.tml配置文件

#服务器IP或者域名
hostname: 192.168.80.10

# web界面的端口
http:
  port: 10080

# 默认admin的密码
harbor_admin_password: Harbor12345

#注释以下内容,除非有https证书
#https:
  # https port for harbor, default is 443
#  port: 443
  # The path of cert and key files for nginx
#  certificate: /your/certificate/path
#  private_key: /your/private/key/path

3. 安装Harbor

sudo ./install.sh


安装完成后harbor目录下生成docker-compose.yml的配置文件

故障处理

1. docker未添加镜像仓库源

在这里插入图片描述
修改daemon.json,添加镜像仓库

sudo vim /etc/docker/daemon.json
{
          "insecure-registries": ["10.1.15.132:10080"]
}

重启docker

systemctl restart docker.service

在这里插入图片描述

2.

在这里插入图片描述

sudo apt install gnupg2 pass

标签:ubuntu1804,compose,Harbor,sudo,v2.2,harbor,https,镜像,docker
来源: https://blog.csdn.net/Lem0n_Tree/article/details/115379445