[root@ser8x11rcig9vyu ~]# docker tag 4048e60fd8dc whistle-docker:release-v2.9.52
[root@ser8x11rcig9vyu ~]# docker push whistle-docker:release-v2.9.52
The push refers to repository [docker.io/library/whistle-docker]
b9c7d724aa0b: Preparing
e46e200a07ab: Preparing
879b1e560390: Preparing
54e2f0467614: Preparing
a0bbbabe7b80: Preparing
78a822fe2a2d: Waiting
denied: requested access to the resource is denied
tag 打错了,没加 docker 用户名
先查看镜像 tag 名称
[root@ser8x11rcig9vyu ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
whistle-docker release-v2.9.52 4048e60fd8dc 3 hours ago 216MB
whistle_docker-whistle latest 4048e60fd8dc 3 hours ago 216MB
yinzhuoqun/whistle-docker 2.9.52 4048e60fd8dc 3 hours ago 216MB
yinzhuoqun/whistle-docker latest 4048e60fd8dc 3 hours ago 216MB
如何打 tag
docker tag 镜像id docker用户名/镜像名称:版本号
版本号不写(当然 : 也是不需要写的)时默认是 latest
docker tag 4048e60fd8dc yinzhuoqun/whistle-docker:2.9.52
如何删除 tag
docker rmi -f tag名称
[root@ser8x11rcig9vyu ~]# docker rmi -f registry.cn-shenzhen.aliyuncs.com/yinzhuoqun/whistle-docker:release-v2.9.52
Untagged: registry.cn-shenzhen.aliyuncs.com/yinzhuoqun/whistle-docker:release-v2.9.52
Untagged: registry.cn-shenzhen.aliyuncs.com/yinzhuoqun/whistle-docker@sha256:ef83dec846ada205468444d1a243006fa9e57ff07a89433c350404c87508034d
再 重新 push
[root@ser8x11rcig9vyu ~]# docker tag 4048e60fd8dc yinzhuoqun/whistle-docker:2.9.52
[root@ser8x11rcig9vyu ~]# docker push yinzhuoqun/whistle-docker:2.9.52
The push refers to repository [docker.io/yinzhuoqun/whistle-docker]
b9c7d724aa0b: Pushed
e46e200a07ab: Pushed
879b1e560390: Pushed
54e2f0467614: Pushed
a0bbbabe7b80: Pushed
78a822fe2a2d: Pushed
2.9.52: digest: sha256:ef83dec846ada205468444d1a243006fa9e57ff07a89433c350404c87508034d size: 1577