Docker image ls has no TAG column

I recently installed Docker Desktop on a new laptop running Ubuntu 22.04, and when I run docker image ls, the TAG column does not exist. Instead, the IMAGE column contains the image name with the tag after a colon, and the headers are much different than I would expect:

$ docker image ls
                                                                                                                                                                                                             i Info →   U  In Use
IMAGE                ID             DISK USAGE   CONTENT SIZE   EXTRA
hello-world:latest   f7931603f70e       20.3kB         3.96kB    U   

I would not be concerned about this except I’m working with Ansible execution environments and their code relies on calling this command and parsing the output.

I have not found any mention of a change to the CLI in the release notes, and all of the examples of this call show the TAG column. I run the same version of Desktop and Engine on MacOS, and the TAG column exists. The output on my Ubuntu laptop also seems ā€œfancierā€ in that it seems to be using ANSI escapes.

My install is fresh and I haven’t changed any configuration besides adding /tmp as a virtual file share. I can’t find any configuration settings to control the output, and the reference page is not helping. Google searches don’t come back with good hits. AI is confused. At this point I’m starting to feel like I’m the crazy one. Does anyone know why I am getting this output?

Other info:

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
...
$ docker version
Client: Docker Engine - Community
 Version:           29.0.2
 API version:       1.51 (downgraded from 1.52)
 Go version:        go1.25.4
 Git commit:        8108357
 Built:             Mon Nov 17 12:33:14 2025
 OS/Arch:           linux/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.51.0 (210443)
 Engine:
  Version:          28.5.2
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.25.3
  Git commit:       89c5e8f
  Built:            Wed Nov  5 14:43:25 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.29
  GitCommit:        442cb34bda9a6a0fed82a2ca7cade05c5c749582
 runc:
  Version:          1.3.3
  GitCommit:        v1.3.3-0-gd842d771
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
17eec7bbc9d7: Pull complete 
Digest: sha256:f7931603f70e13dbd844253370742c4fc4202d290c80442b2e68706d8f33ce26
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/
$ docker images
                                                                                                                                                                                                             i Info →   U  In Use
IMAGE                ID             DISK USAGE   CONTENT SIZE   EXTRA
hello-world:latest   f7931603f70e       20.3kB         3.96kB    U   
$ cat ~/.docker/config.json 
{
	"auths": {},
	"credsStore": "desktop",
	"currentContext": "desktop-linux"
}

$ cat ~/.docker/daemon.json 
{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false
}
$ docker context ls
NAME              DESCRIPTION                               DOCKER ENDPOINT                                    ERROR
default           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                        
desktop-linux *   Docker Desktop                            unix:///home/myuser/.docker/desktop/docker.sock   
$ ls /home/myuser/.docker/desktop/docker.sock 
/home/myuser/.docker/desktop/docker.sock

$ ls /var/run/docker.sock
ls: cannot access '/var/run/docker.sock': No such file or directory
$ dpkg -l | grep docker
ii  docker-buildx-plugin                          0.30.0-1~ubuntu.22.04~jammy             amd64        Docker Buildx plugin extends build capabilities with BuildKit.
ii  docker-ce-cli                                 5:29.0.2-1~ubuntu.22.04~jammy           amd64        Docker CLI: the open-source application container engine
ii  docker-compose-plugin                         2.40.3-1~ubuntu.22.04~jammy             amd64        Docker Compose (V2) plugin for the Docker CLI.
ii  docker-desktop                                4.51.0-210443                           amd64        Docker Desktop is ... a lot of text ...

Relying on terminal output in Anisble playbooks or scripts is usually not a good idea, but I did it sometimes when there was no other way. Fortunately there is with Docker and it is even better for Ansible because it can automatically convert json to Anisble objects.

But your Docker client and daemon version doesn’t match either and tthe output of docker image ls changed in the latest major Docker CE cli release. You should instal the same client version from the APT repo. If it was installed automatically by Docker Desktop, then it should be reported as a bug. If you installed manually, you should use a specific version. The Docker CE installation guide sows how you can do it, but I think Docker Desktop installs it automatically, so you should only add the repository to apt.

If you leave everything as is, you can still switch to the json output

docker image ls --format json

And parse the json easily from Ansible. Or use the ā€œdocker_host_infoā€ Ansible module which can also list images.

https://docs.ansible.com/projects/ansible/latest/collections/community/docker/docker_host_info_module.html#ansible-collections-community-docker-docker-host-info-module

That way you would alos not rely on the docker cli, because Ansible would use the API directly.

1 Like

I would put my money on: this is due to the containerd image store being used.

Hi rimelek. Thank you for your thoughtful reply. I appreciate it!

My Docker install is a very vanilla Docker Desktop install from deb. Nothing custom here. I updated the install on my Mac today, and now it is displaying the same output as my Linux machine. I’m guessing this is a UI change going forward, and I just encountered it right away.

The problem I am having with Ansible is actually in the ansible-navigator code in their ImageList parse method. The command they construct to get the output is just docker images, and I fully agree that it should use --format json. I don’t see that there has been an issue filed there for this yet, so I’ll probably hop on over and file one.

Hi meyay. I did see that my containerd version updated today. I have to admit that I’m not very knowledgeable about this. Are you saying that the containerd update is what changed the output of the images command? I’m curious about what you mean. If you could expand on your comment, I’d like to learn more.

Nope. I am saying that fresh Docker Engine and Docker Desktop installation use containerd as image store, and that i think the output is different when the containerd image store is used.

You could try if deactivating the image store works.

The whole output changed:
colums before: ā€œREPOSITORYā€ ā€œTAGā€ ā€œIMAGE IDā€ ā€œCREATEDā€ ā€œSIZEā€
colums now: ā€œIMAGEā€ ā€œIDā€ ā€œDISK USAGEā€ ā€œCONTENT SIZEā€ ā€œEXTRAā€

Update: I was mistaken, it is not related to the containerd image store. The output remains the same, regardless of the image store. It is the general layout.

I understand that, but that doesn’t mean you could not accidentally install Docker CE on the host. It happened with many people. In some cases even a snap package version of Docker was installed automatically when they installed the operating system. Since I have not tested it, I can’t say it couldn’t be an installer bug or that it could not be an intentional method expecting that the small version difference should not cause problems with a compatible daemon and that users should update their Docker Desktop regularly, but I would still expect the same CLI and daemon version.

I think the containerd image store can change the docker inspect output, but not the docker images output. The new output was announced in the release notes of v29

https://docs.docker.com/engine/release-notes/29/#new

  • docker image ls now uses the new view (like --tree but collapsed) by default. docker/cli#6566

So the v29.0.2 must be the reason why the TAG column is missing. This is another compatibility issue that should be fixed by the developers of the ansible navigator. And if Docker Desktop installs the latest client instead of a matching version, that should be fixed by Docker. I would test it, but I don’t have Linux desktops currently.

The release notes say it all. Marked as solved. Thanks for this.

I assume you found out that docker image ls --no-trunc shows the old view?

1 Like

I see that, and it’s an easy drop in replacement for now. I do have a working draft using --format json which I feel will be best for the long run.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.