Harbor镜像仓库部署
Harbor仓库部署之前需要先安装docker环境,可参考另一篇博客《Docker-从入门到精通》
安装docker-dompose
下载二进制文件
curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
赋予二进制文件可执行权限
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
测试是否安装成功
docker-compose --version
部署Harbor镜像仓库
下载离线安装包
cd /opt
wget -c https://github.com/goharbor/harbor/releases/download/v2.1.1/harbor-offline-installer-v2.1.1.tgz
tar xf harbor-offline-installer-v2.1.1.tgz -C /usr/local/
修改配置文件
vim /usr/local/harbor/harbor.yml
hostname: harbor.ops.com
http:
port: 80
#https:
# port: 443
# certificate:
# private_key:
harbor_admin_password: Harbor12345
database:
password: root123
max_idle_conns: 50