harbor私有庫(備忘)

參考

https://github.com/vmware/harbor/blob/v1.1.0/docs/kubernetes_deployment.md

準(zhǔn)備

yum install python-pip -y
pip install --upgrade pip
pip install docker-compose

wget https://github.com/vmware/harbor/releases/download/v1.1.0/harbor-online-installer-v1.1.0.tgz
tar -xvf harbor-online-installer-v1.1.0.tgz
cd harbor

編輯配置

eidt harbor.cfg

[root@es2-bm0606 harbor]# egrep 'ssl_cert|hostname|ui_url' harbor.cfg
hostname = reg-i.xzxpay.com
ui_url_protocol = https
ssl_cert = /data/cert/server.crt
ssl_cert_key = /data/cert/server.key

./install.sh

測試

[root@cloud4ourself-kube1 harbor]# docker version
Client:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   78d1802
 Built:        Tue Jan 10 20:20:01 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   78d1802
 Built:        Tue Jan 10 20:20:01 2017
 OS/Arch:      linux/amd64
[root@cloud4ourself-kube1 harbor]# docker login -u admin -p Harbor12345 reg-i.xzxpay.com
Login Succeeded
[root@cloud4ourself-kube1 harbor]#
[root@cloud4ourself-kube1 harbor]# docker pull centos:centos7
centos7: Pulling from library/centos
Digest: sha256:4eda692c08e0a065ae91d74e82fff4af3da307b4341ad61fa61771cc4659af60
Status: Downloaded newer image for centos:centos7
[root@cloud4ourself-kube1 harbor]# docker tag centos:centos7 reg-i.xzxpay.com/library/centos:centos7
[root@cloud4ourself-kube1 harbor]# docker push reg-i.xzxpay.com/library/centos:centos7
The push refers to a repository [reg-i.xzxpay.com/library/centos]
36018b5e9787: Pushed
centos7: digest: sha256:4eda692c08e0a065ae91d74e82fff4af3da307b4341ad61fa61771cc4659af60 size: 529
[root@cloud4ourself-mykc4 ~]# docker pull reg-i.xzxpay.com/library/centos:centos7
centos7: Pulling from library/centos

Digest: sha256:4eda692c08e0a065ae91d74e82fff4af3da307b4341ad61fa61771cc4659af60
Status: Downloaded newer image for reg-i.xzxpay.com/library/centos:centos7


#docker search 
#curl  http://localhost:5000/v1/search?q=postgresql
#curl  http://10.10.105.71:5000/v2/_catalog
curl  https://reg-i.xzxpay.com/api/search?q=google

# pull from dockerhub
D=`date +%Y%m%d`
for i in {nginx,redis}
do docker pull $i; docker tag $i:latest reg-i.xzxpay.com/dockerhub/$i:$D; docker push reg-i.xzxpay.com/dockerhub/$i:$D; done
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容