内容纲要
1.实验环境
centos7.x docker1.13.1 ip:192.168.50.50
(1)安装docker 设置docker仓库ip地址并重启docker
yum install docker -y
vim /etc/sysconfig/docker
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --insecure-registry=192.168.50.50:5000'
systemctl restart docker
(2).下载harbor压缩包并解压安装
wget https://github.com/goharbor/harbor/releases/download/v1.10.1/harbor-offline-installer-v1.10.1.tgz
tar zxvf harbor-offline-installer-v1.10.1.tgz
cd harbor/
docker load -i harbor.v1.10.1.tar.gz
vim harbor.yml
hostname: 192.168.50.50
harbor_admin_password: guaiwolouhaha
注释掉https
# https related config
#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
./install.sh
✖ Need to install docker-compose(1.18.0+) by yourself first and run this script again.
(3).提示缺少docker-compose 安装docker-compose 运行harbor install.sh
yum install epel-release -y
yum install python-pip -y
mkdir ~/.pip
vim ~/.pip/pip.conf
[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple
yum install python-devel libffi-devel gcc openssl-devel libselinux-python -y
pip install docker-compose
./install.sh
✔ ----Harbor has been installed and started successfully.----
(4)在浏览器中输入IP即可访问harbor,帐户admin
密码guaiwolouhaha