Docker Community Forums

Share and learn in the Docker community.

Created docker container with docker run, now the container does not show up in docker ps -a

docker

#1

Not sure if this is a bug, or just plain misconfiguration on my part.

Running OS: Ubuntu 18.10 (GNU/Linux 4.18.0-15-generic x86_64)
Docker: 18.09.1, build 4c52b90

Started a container like this:

docker run \
-d \
--name plex \
--network=host \
--restart unless-stopped \
-e TZ="<timezone>" \
-e PLEX_CLAIM="<claimToken>" \
-v <path/to/plex/database>:/config \
-v <path/to/transcode/temp>:/transcode \
-v <path/to/media>:/data \
plexinc/pms-docker

Now if I try to do sudo docker ps -a I don’t see the container. This is the only output I get:

CONTAINER ID        IMAGE                     COMMAND             CREATED             STATUS                   PORTS                    NAMES
a0a9292c1891        hello-world               "/hello"            3 hours ago         Exited (0) 3 hours ago                            stoic_golick

The only container listed by ps -a is the “hello-world” docker test, not my plex container. I get the same output when I try to do sudo docker container ls --all

The plex container/service is clearly running, since I can use the service the container provides. And when I do pstree I get this output:

systemd─┬─accounts-daemon───2*[{accounts-daemon}]
        ├─agetty
        ├─atd
        ├─containerd───16*[{containerd}]
        ├─cron
        ├─dbus-daemon
        ├─dockerd─┬─docker-containe─┬─docker-containe─┬─s6-svscan─┬─s6-supervise
        │         │                 │                 │           └─s6-supervise───python───{python}
        │         │                 │                 └─9*[{docker-containe}]
        │         │                 └─18*[{docker-containe}]
        │         ├─docker-proxy───7*[{docker-proxy}]
        │         └─17*[{dockerd}]
        ├─dockerd─┬─containerd─┬─containerd-shim─┬─s6-svscan─┬─s6-supervise
        │         │            │                 │           └─s6-supervise───sh───Plex Media Serv─┬─Plex DLNA Serve───18*[{Plex DLNA Serve}]
        │         │            │                 │                                                 ├─Plex Script Hos───13*[{Plex Script Hos}]
        │         │            │                 │                                                 ├─Plex Script Hos───9*[{Plex Script Hos}]
        │         │            │                 │                                                 ├─Plex Tuner Serv───10*[{Plex Tuner Serv}]
        │         │            │                 │                                                 └─23*[{Plex Media Serv}]
        │         │            │                 └─9*[{containerd-shim}]
        │         │            └─16*[{containerd}]
        │         └─16*[{dockerd}]
        ├─irqbalance───{irqbalance}
        ├─lvmetad
        ├─networkd-dispat
        ├─polkitd───2*[{polkitd}]
        ├─rsyslogd───3*[{rsyslogd}]
        ├─snapd───11*[{snapd}]
        ├─sshd─┬─sshd───sshd───bash───sudo───pstree
        │      └─6*[sshd───sshd]
        ├─systemd───(sd-pam)
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-network
        ├─systemd-resolve
        ├─systemd-timesyn───{systemd-timesyn}
        ├─systemd-udevd
        ├─thermald───{thermald}
        └─unattended-upgr───{unattended-upgr}

I have tried to do sudo docker stop plex and sudo docker restart plex and sudo docker container rm plex but then I get this error: Error response from daemon: No such container: plex

How is this possible? Shouldn’t the container be listed when doing docker ps -a?


#3

Found the reason for the trouble. I had installed docker using both apt-get and snap. Removed every version and installed correctly. No problem now, and everything gets listet when I do docker ps -a


(Gary Forghetti) #4

Good news! Thanks for posting the update.