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
<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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap