1.请问有名字,而没有TAG的镜像,也叫作虚悬镜像吗?
2.如下:
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 1.0 a62e2ad4fe04 46 hours ago 174MB
node02.harbor.com/test/ubuntu <none> a62e2ad4fe04 46 hours ago 174MB
这两个镜像,是我测试harbor使用的,其实为同一个镜像,他们的ID一样,第一个是本地的,第二个是我把本地镜像推送到harbor后又从harbor上pull下来的,请问这种时候,如何只删除第二个镜像呢?
如果使用命令
docker images|grep none|awk '{print $3}'|xargs docker rmi
Error response from daemon: conflict: unable to delete a62e2ad4fe04 (must be forced) - image is referenced in multiple repositories
即使用ID,因为有两个一样的,所以不可以
docker images|grep none|awk '{print $3}'|xargs docker rmi -f
则会把两个镜像都删除
docker rmi node02.harbor.com/test/ubuntu
Error: No such image: node02.harbor.com/test/ubuntu
没有tag也不可以直接用名字删除
docker rmi node02.harbor.com/test/ubuntu:<none>
-bash: syntax error near unexpected token `newline'
这样也不可以
请问大家有好的方案吗?