Harbor的安装及使用
Posted 处静息迹
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Harbor的安装及使用相关的知识,希望对你有一定的参考价值。
安装docker-ce
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum install docker-ce
1 2 | yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum install docker-ce |
systemctl enable docker systemctl start docker
1 2 | systemctl enable docker systemctl start docker |
docker --version Docker version 19.03.5, build 633a0ea
1 2 | docker --version Docker version 19.03.5, build 633a0ea |
3、安装docker-compose
wget https://github.com/docker/compose/releases/download/1.25.0/docker-compose-Linux-x86_64 mv docker-compose-Linux-x86_64 /usr/bin/docker-compose chmod +x /usr/bin/docker-compose
1 2 3 | wget https://github.com/docker/compose/releases/download/1.25.0/docker-compose-Linux-x86_64 mv docker-compose-Linux-x86_64 /usr/bin/docker-compose chmod +x /usr/bin/docker-compose |
docker-compose --version docker-compose version 1.25.0, build 0a186604
1 2 | docker-compose --version docker-compose version 1.25.0, build 0a186604 |
4、下载harbor离线安装包
wget https://github.com/goharbor/harbor/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz tar xf harbor-offline-installer-v1.9.3.tgz
1 2 | wget https://github.com/goharbor/harbor/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz tar xf harbor-offline-installer-v1.9.3.tgz |
配置harbor
cp harbor.yml.tmpl harbor.yml
配置未本机IP:192.168.1.208,关闭SSL验证:注销掉https 及下面的内容。
6、安装harbor ./harbor/install.sh (--with-clair)
注意:--with-clair参数是启用漏洞扫描功能
访问http://192.168.1.208验证,账号admin,密码(harbor.yml中配置)
由于docker默认是以https连接registry,所以通过docker连接Harbor时,需要更改/etc/docker/daemon.json配置文件,增加"insecure-registries": ["http://192.168.1.208"]参数。
以上是关于Harbor的安装及使用的主要内容,如果未能解决你的问题,请参考以下文章