1、登录本地Harbor服务首页
2、用户管理,添加用户管理容器项目
三、用户登录、镜像推送
root@harbor:~# docker login 127.0.0.1:8999Username (dev): adminPassword: Login Succeeded
可以查看推送命令
root@harbor:~# docker tag python:alpine 127.0.0.1:8999/my-images/python:alpineroot@harbor:~# docker tag app:v3 127.0.0.1:8999/my-images/app:v3 root@harbor:~# docker push 127.0.0.1:8999/my-images/python:alpine root@harbor:~# docker push 127.0.0.1:8999/my-images/app:v3
查看上传的镜像
4、客户端下载镜像测试
root@ubuntu:~# docker login 39.xx.xx.xx:8999Username: adminPassword: Error response from daemon: Get https://39.xx.xx.xx:8999/v1/users/: http: server gave HTTP response to HTTPS client 解决办法: root@ubuntu:~# echo "{ "insecure-registries":["xx.xx.xx.xx:8999"] }" > /etc/docker/daemon.json root@ubuntu:~# cat /etc/docker/daemon.json { "insecure-registries": ["39.104.63.208:8999"] }
root@ubuntu:~# systemctl daemon-reload root@ubuntu:~# systemctl restart docker
root@ubuntu:~# docker pull 39.xx.xx.xx:8999/my-images/app:v3