To rename a docker image

Posted penguins

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了To rename a docker image相关的知识,希望对你有一定的参考价值。

To rename an image, you give it a new tag, and then remove the old tag using the ‘rmi’ command:

  • $ docker tag <old_name> <new_name>
  • $ docker rmi <old_name>

This second step is scary, as ‘rmi’ means “remove image”. However, docker won’t actually remove the image if it has any other tags. That is, if you were to immediately follow this with: docker rmi <new_name>, then it would actually remove the image (assuming there are no other tags assigned to the image).

 

Ref:

https://www.quora.com/How-does-one-rename-a-docker-image

以上是关于To rename a docker image的主要内容,如果未能解决你的问题,请参考以下文章

docker pull命令出现failed to register layer: rename C:ProgramDataDockerimagelcowlayerdb mpwrite-s

Docker push image to Docker hub

Docker中如何删除image(镜像)

markdown how-to-build-docker-image.md #docker_training

Gitlab CE Docker Image Too Large to Push

inexact rename detection was skipped due to too many files