docker run 命令 如果local image中有对应 镜像+tag 不会从新拉取镜像
docker pull 会进行拉取
先进行镜像更改
[root@master01 ~]# docker tag alpine:latest registry.song.test.cnpc:5000/apline:1.1[root@master01 ~]# docker push registry.song.test.cnpc:5000/apline:1.1The push refers to a repository [registry.song.test.cnpc:5000/apline]a464c54f93a9: Pushed 1.1: digest: sha256:5c40b3c27b9f13c873fefb2139765c56ce97fd50230f1f2d5c91e55dec171907 size: 528[root@master01 ~]# docker tag registry.song.test.cnpc:5000/openshift3/logging-curator:v3.6 registry.song.test.cnpc:5000/apline:1.1[root@master01 ~]# docker push registry.song.test.cnpc:5000/apline:1.1The push refers to a repository [registry.song.test.cnpc:5000/apline]37690f4f1c61: Mounted from openshift3/logging-curator 02404b4d7e5d: Mounted from openshift3/logging-curator e1d829eddb62: Mounted from openshift3/logging-curator 1.1: digest: sha256:9a0d7cf6532da31f08239cc25e74bad118a828b4dc3a67a8bf442ff6faba140f size: 949
测试两个命令
[root@ha ~]# docker run -it --name song registry.song.test.cnpc:5000/apline:1.1/ # lsbin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var[root@ha ~]# docker pull registry.song.test.cnpc:5000/apline:1.1Trying to pull repository registry.song.test.cnpc:5000/apline ... 1.1: Pulling from registry.song.test.cnpc:5000/aplineDigest: sha256:9a0d7cf6532da31f08239cc25e74bad118a828b4dc3a67a8bf442ff6faba140fStatus: Downloaded newer image for registry.song.test.cnpc:5000/apline:1.1