How to Rename Docker Image with none TAG and REPOSITORY?


Did you just create a Docker image using a dockerfile with a build command and did not provide an image name? Well then, when run docker images you will see your image name as <none> for tag and repository.

% docker images
REPOSITORY    TAG       IMAGE ID       CREATED          SIZE
<none>        <none>    5eeb4aaaec59   16 seconds ago   180MB
ubuntu        latest    3c2df5585507   10 days ago      69.2MB
amazonlinux   latest    5514655128c4   2 weeks ago      194MB
alpine        latest    a6215f271958   3 months ago     5.29MB

How do you rename the image you just created?

First, find out the IMAGE ID of the image and then run the docker image tag command followed by image id and image name.

% docker image tag 5eeb4aaaec59 myimg:2.1.0
  % docker images
REPOSITORY    TAG       IMAGE ID       CREATED              SIZE
myimg         2.1.0    5eeb4aaaec59   About a minute ago   180MB

Note tag will be latest if you do not provide any.

Docker rename image
-


Have Questions? Post them here!

Topics Coverage:


🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.

Follow Us: GitHub | Facebook | Twitter | Instagram