docker推送鏡像到harbor

1、主機環境
192.168.19.7 docker客戶端
192.168.19.4 harbor服務端git

2、 docker登陸harbor
docker推送鏡像到harbor
密碼是harbor-web的登陸密碼web


若是有以下報錯:
docker推送鏡像到harbor
一、須要修改docker.servicedocker

vim /usr/lib/systemd/system/docker.service

EnvironmentFile=-/etc/sysconfig/docker
ExecStart=/usr/bin/dockerd $OPTIONS
docker推送鏡像到harbor
二、修改/etc/docker/daemon.json
{<br/>"insecure-registries": ["http://192.168.19.4"]<br/>}
docker推送鏡像到harbor
而後重啓docker便可json

systemctl daemon-reload
systemctl restart docker.service

二、若是有以下報錯:vim

[root@test3 ~]# docker push 192.168.0.7/gitlab/gitlab_back:v1
The push refers to a repository [192.168.0.7/gitlab/gitlab_back]
Get https://192.168.0.7/v1/_ping: read tcp 192.168.0.6:40306->192.168.0.7:443: read: connection reset by peer

docker推送鏡像到harbor

解決辦法:
編輯vim /etc/sysconfig/docker文件。若是沒有則建立。
docker推送鏡像到harbortcp

3、登陸harbor建立項目
填寫項目名稱便可
docker推送鏡像到harbor
harbor中會提示推送方式,按照提示操做便可
docker推送鏡像到harbor
docker推送鏡像到harbor
而後查看就能夠看到Harbor上的鏡像文件信息,還會提示若是拉去該鏡像
docker推送鏡像到harboride

相關文章
相關標籤/搜索