DEV Community

KIranuknow
KIranuknow

Posted on

Docker Commands copy, remove images.

View existing images

docker images 
Enter fullscreen mode Exit fullscreen mode

My output shows like this:

REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu latest 78klio18m 2 weeks ago 77.9MB 
Enter fullscreen mode Exit fullscreen mode

**
Rename existing image:**

docker tag <source_name>:<source_tag> <target_name>:<target_tag> 
Enter fullscreen mode Exit fullscreen mode

example:

docker tag ubuntu:latest rasa:chatbot 
Enter fullscreen mode Exit fullscreen mode

Replace the placeholders:
: The current name of the image.
: The current tag of the image.
: The new name you want to assign to the image.
: (Optional) The new tag you want to assign to the image (if applicable).

Delete existing image

 docker rmi ubuntu 
Enter fullscreen mode Exit fullscreen mode

finally

docker images REPOSITORY TAG IMAGE ID CREATED SIZE rasa chatbot ca8b0f1234c 2 weeks ago 77.9MB 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)