Docker PS not showing running containers.

Hello! I’m running Ubuntu 24.04. I’m running docker through apt and verified that I do not have snap version installed as well.

I was trying to start up a plex container, but I kept having issues getting going so I decided to try a different method, but the other method isn’t working either. I suspect the plex container is still running, but when I run docker ps -a, I only show ‘hello-world’ running. I have homepage and immich containers running currently and I can access them through their web APIs.

I know I at least have one “ghost” container running, because I have a jellyfin directory that comes back after I delete it. So I’ve been trying to find that and that plex containers… but I’m not showing anything running…

Docker version 28.0.1, build 068a01e

If I go to /var/lib/docker/containers I can see 8 containers running… But if I run
sudo docker stop {container id}I can’t get any of the containers to stop…

You see containers running on the file system?

What does docker ps -a tell you?

Here is what it shows, but I know for a fact I have at least 2 other containers actively running because I can access the web UI.

CONTAINER ID   IMAGE         COMMAND    CREATED       STATUS                   PORTS     NAMES
a1fb12e619c6   hello-world   "/hello"   4 hours ago   Exited (0) 4 hours ago             blissful_raman```

Prior to whatever I did with plex, I could see all of my containers with that command.

What OS are you running? Any virtualization? How did you install Docker? Are you using Docker Desktop?

On Linux, try netstat -tulpn to see which processes are listening on the ports.

I’m running Ubuntu server 24.04. I’m not using docker desktop. Everything is via CLI. I installed docker from their repo and removed the snap version.

tcp6 0 0 :::32400 :::* LISTEN -

Since there are multiple repos installing a kind of Docker, it is usually best linking the followed guide.

Since you are using Docker CE, not Docker Desktop, all processes are running on the host and you can use

ps aux

to list all processes and seach for any docker or containerd related process. On debian based systems, you should also be able to use this command:

ps auxf

so the processes are listed as a tree and you cans ee what started the process. If you have another instance of containerd or Docker, it can help to find it.

Containerd also have a client called ctr. So if for any reason there are multiple namespaces, containers in other namespaces could be hidden for Docker. Docker containers are normally in the moby namespace.

sudo ctr ns ls

output:

NAME LABELS
moby

Checking the output of

docker context ls

can also be useful in case anything created a new context. For example if you once had rootful Docker and it was changed to rootless, your containers will still run, but you won’t see until changing context.

1 Like

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