How to rename docker images without rebuilding it?

277    Asked by Dannasahi in Devops , Asked on Jul 25, 2023

I have made a docker image, although I have forgotten to provide a certain name to it. It has taken an anonymous name by default. Can anyone guide me on how to rename docker image without rebuilding it? I am completely at a loss here. I have seeked for an answer to this question but nothing has been really helpful.

Answered by Danna sahi

 It is possible to rename the docker image by using the docker tag command. You can deploy the command mentioned below to perform the action.


    $ docker tag 01dName : tag NewName: tag

There is yet another method to rename the docker images without rebuilding it. To rneame docker container, utilize the rename sub-command as depicted in the below-mentioned example. We are renaming the container discourse_app to a fresh name disc_app

$ sudo docker rename discourse_app disc_app
After you have renamed the container, you can confirm that it is presently utilizing the new name provided.
$ sudo docker pa

The DevOps certification training offered at JanBask offers an experience alike offline classes and provides a total DevOps discipline preparation by teaching all the core concepts and techniques required to fetch a job as a DevOps engineer. Janbask imparts a coherent and extensive training process through interesting e-learning equipments. They support in making you job-ready and help you possess the potential to build powerful business strategies leading to considerable and valuable outputs. On completion of the course, you can gain competent skills and smart tactics to proceed in the tempting job market.



Your Answer

Interviews

Parent Categories