Harbor
Harbor
Noahharbor
一、docker 部署 1.卸载旧的版本 2.安装需要的包 3.设置镜像仓库 4.更新 yum 软件包索引 5.安装 docker 6.阿里云镜像加速
yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-engine
yum install -y yum-utils
yum-config-manager
–add-repo
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum -y install docker-ce-20.10._ docker-ce-cli-20.10._ containerd.io
docker-ce #社区版 #安装完成后验证
docker version
7.docker-compose 安装
二、部署 harbor 1.下载 harbor 安装文件 2.配置 harbor #进入解压后的包
cd /opt/soft/harbor/harbor
vim harbor.yml #配置文件 harbor.yml 详解
Configuration file of Harbor
The IP address or hostname to access admin UI and registry service.
DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external
clients.
hostname: 机器 ip 地址或域名
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-‘EOF’
{
“registry-mirrors”: [“https://axvfsf7e.mirror.aliyuncs.com"]
}
EOF #启动
systemctl daemon-reload
systemctl start docker
systemctl enable docker #官网下载
https://docs.docker.com/compose/install #安装
curl -L https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-linuxx86_64 -o usr/local/bin/docker-compose #授权
chmod +x /usr/local/bin/docker-compose #测试安装
docker-compose version #卸载
rm -f /usr/local/bin/docker-compose #创建 harbor 包存放目录
mkdir -p /opt/soft/harbor && cd /opt/soft/harbor #下载地址
wget https://github.com/goharbor/harbor/releases/download/v1.10.10/harbor-online-installerv1.10.10.tgz #解压
tar -zxf harbor-online-installer-v1.10.10.tgz
http related config
http:
port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
https related config
#下面的 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
./install.sh
#Harbor 依赖的镜像及启动服务查看
docker-compose ps #访问
http://ip:prot







