安装与配置
1.安装docker和docker-compose
yum install -y docker-compose(需要epel源)2.下载harbor-offline-installer-v1.5.1.tgz
可直接到github下载,或者其他地址:其他地址3.上传到/opt,并解压
gzip -dv harbor-offline-installer-v1.5.0.tgz
tar xf harbor-offline-installer-v1.5.0.tar
解压后:
[root@docker01 harbor]# ll
total 854960
drwxr-xr-x 3 root root 23 Mar 22 13:58 common
-rw-r--r-- 1 root root 1185 May 2 2018 docker-compose.clair.yml
-rw-r--r-- 1 root root 1725 May 2 2018 docker-compose.notary.yml
-rw-r--r-- 1 root root 3596 May 2 2018 docker-compose.yml
drwxr-xr-x 3 root root 156 May 2 2018 ha
-rw-r--r-- 1 root root 6687 May 2 2018 harbor.cfg
-rw-r--r-- 1 root root 875401338 May 2 2018 harbor.v1.5.0.tar.gz
-rwxr-xr-x 1 root root 5773 May 2 2018 install.sh
-rw-r--r-- 1 root root 10771 May 2 2018 LICENSE
-rw-r--r-- 1 root root 482 May 2 2018 NOTICE
-rwxr-xr-x 1 root root 27379 May 2 2018 prepare
4.修改harbor.cfg配置文件
hostname = 10.0.0.15
harbor_admin_password = 1234565.执行install.sh
全路径下执行./install.sh
安装完后直接访问地址10.0.0.15显示界面:
默认账号:admin 密码:123456(刚刚在配置文件中设置过的)
新建项目才可实现推送镜像
然后打标签
docker tag busybox:latest 10.0.0.15/wsm/busybox
加入信任文件
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"insecure-registries": ["10.0.0.10:5000","10.0.0.15"]
}
登录
docker login 10.0.0.15
上传
docker push 10.0.0.15/wsm/busybox