安裝與配置
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.執(zhí)行install.sh
全路徑下執(zhí)行./install.sh
安裝完后直接訪問地址10.0.0.15顯示界面:
image.png
默認(rèn)賬號(hào):admin 密碼:123456(剛剛在配置文件中設(shè)置過的)
image.png
新建項(xiàng)目才可實(shí)現(xiàn)推送鏡像
然后打標(biāo)簽
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