What does 'docker images ls' do?

Viewed 396

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?

2 Answers

Long story short: the list is empty because you have no images named ls.

You can read about it in the docs.

Related