前期工作
- 一个镜像
- 登录了远程仓库
以上两步可以参考 https://blog.csdn.net/qq_32475739/article/details/88566825
推送
格式如下,image为镜像名, username为远程仓库的用户名,一定要是用户名,不然推不上去
[root@localhost project]$ docker tag image username/repository:tag
例子:
[root@localhost project]$ docker tag csdn-test myname/springboot:v0.0.1
拉取
格式如下
[unique@localhost ~]$ sudo docker pull username/repository:tag