docker tag <image>:<tag> <ip>:<port>/<image>:<tag>
1
[root@chobon ~]# docker tag demo_service_20191230_184347:master 192.168.122.101:5000/library/demo_service:master
查看镜像是否已经创建好
1 2 3 4
[root@chobon ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE demo_service_20191230_184347 master e636d97a1326 46 hours ago 246MB 192.168.122.101:5000/library/demo_service master e636d97a1326 46 hours ago 246MB
推送镜像到私有仓库
1 2
[root@chobon ~]# docker push 192.168.122.101:5000/library/demo_service Get https://192.168.122.101:5000/v2/: http: server gave HTTP response to HTTPS client