Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'docker images ls' do?

Tags:

docker

I looked up the docs to understand the difference between commands docker image (managing images) and docker images (list images). So the second option seems to be a shortcut for docker image ls which also lists images.

What I noticed is, when running docker image ls or docker images I get a list of all my images as expected, but when I accidentally mixed those two up and run docker images ls I get an empty table without any entries:

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

I would expect it either to be an invalid command since it is redundant or to show the same list of all my images.

So what does docker images ls actually show?

like image 276
TME Avatar asked Mar 03 '23 00:03

TME


1 Answers

  • docker image ls lists the images
  • docker images also lists the images
  • docker images ls lists the images with the repository name ls. And as you dont have any images named ls it is returning an empty list.

Reference : https://docs.docker.com/engine/reference/commandline/images/

like image 92
Shinva Avatar answered May 31 '23 16:05

Shinva