码迷,mamicode.com
首页 > 其他好文 > 详细

To rename a docker image

时间:2019-01-05 13:34:14      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:however   rmi   imm   eve   ima   sign   using   dia   tags   

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

标签:however   rmi   imm   eve   ima   sign   using   dia   tags   

原文地址:https://www.cnblogs.com/penguins/p/10223839.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!