[英]Started container with docker run, now it is not showing up in docker ps -a
I started a docker container with docker run, like this: 我用docker run启动了一个docker容器,如下所示:
docker run \
-d \
--name plex \
--restart unless-stopped \
--network=host \
-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
Link to GitHub.com/plexinc/pms-docker 链接到GitHub.com/plexinc/pms-docker
The docker container is running , as Im able to access the port and service, but I can't seem to list the container when Im running sudo docker ps -a
or sudo docker ps -aq
or sudo docker ps --filter "name=plex"
docker容器正在运行 ,因为我能够访问端口和服务,但我似乎无法列出容器当我运行sudo docker ps -a
或sudo docker ps -aq
sudo docker ps --filter "name=plex"
sudo docker ps -aq
或sudo docker ps --filter "name=plex"
I tried to run pstree, and got this output: 我试着运行pstree,得到了这个输出:
systemd─┬─accounts-daemon───2*[{accounts-daemon}]
├─agetty
├─atd
├─containerd───14*[{containerd}]
├─cron
├─dbus-daemon
├─dockerd─┬─docker-containe─┬─docker-containe─┬─s6-svscan─┬─s6-supervise
│ │ │ │ └─s6-supervise───python───{python}
│ │ │ └─9*[{docker-containe}]
│ │ └─17*[{docker-containe}]
│ ├─docker-proxy───6*[{docker-proxy}]
│ └─21*[{dockerd}]
├─dockerd─┬─containerd─┬─containerd-shim─┬─s6-svscan─┬─s6-supervise
│ │ │ │ └─s6-supervise───sh───Plex Media Serv─┬─Plex DLNA Serve───16*[{Plex DLNA Serve}]
│ │ │ │ ├─Plex Script Hos───13*[{Plex Script Hos}]
│ │ │ │ ├─Plex Script Hos───9*[{Plex Script Hos}]
│ │ │ │ ├─Plex Tuner Serv───10*[{Plex Tuner Serv}]
│ │ │ │ └─28*[{Plex Media Serv}]
│ │ │ └─9*[{containerd-shim}]
│ │ └─17*[{containerd}]
│ └─20*[{dockerd}]
So it is clearly running in docker. 所以它显然在docker中运行。 How do I restart or rebuild this container when I can't seem to get the ID from docker ps -a? 当我似乎无法从docker ps -a获取ID时,如何重新启动或重建此容器? sudo docker stop plex
or sudo docker restart plex
does not work either. sudo docker stop plex
或sudo docker restart plex
也不起作用。
Sorry, did not include os and docker. 对不起,没有包括os和docker。 Im running on Ubuntu server Ubuntu 18.10 (GNU/Linux 4.18.0-15-generic x86_64) 我在Ubuntu服务器Ubuntu 18.10上运行(GNU / Linux 4.18.0-15-通用x86_64)
Docker version 18.09.1, build 4c52b90 Docker版本18.09.1,build 4c52b90
sudo ps aux |grep lex
output: sudo ps aux |grep lex
输出:
root 2392 0.0 0.0 196 4 ? S 17:53 0:00 s6-supervise plex
HOMEUSER 2394 0.0 0.0 4504 752 ? Ss 17:53 0:00 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server
HOMEUSER 2402 1.6 0.5 707684 91316 ? Sl 17:53 2:47 /usr/lib/plexmediaserver/Plex Media Server
HOMEUSER 2458 0.1 0.3 1791280 55380 ? SNl 17:53 0:17 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.14.1.5488-cc260c476 /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/System.bundle
HOMEUSER 3134 0.2 0.1 373108 22540 ? Sl 17:53 0:22 /usr/lib/plexmediaserver/Plex DLNA Server
HOMEUSER 3137 0.0 0.0 372964 15276 ? Sl 17:53 0:00 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.14.1.5488-cc260c476 32600 /waitmutex
HOMEUSER 6382 0.0 0.0 7980 896 pts/1 S+ 20:45 0:00 grep --color=auto lex
Had installed docker twice. 已经安装了两次docker。 Once with apt-get
and once with snap
. 一次使用apt-get
,一次使用snap
。
Completely removed docker, both from apt and snap, and installed just using apt-get, and now the plex container is visible using docker ps -a
. 从apt和snap完全删除了docker,并使用apt-get安装,现在使用docker ps -a
可以看到plex容器。
To Just answer the question, there is also a way to identify the container id without using docker ps
. 要回答这个问题,还有一种方法可以在不使用docker ps
情况下识别容器ID。 You have to try deleting the image on which the container is created. 您必须尝试删除创建容器的图像。
In your case you have to give docker rmi plexinc/pms-docker
. 在你的情况下,你必须给docker rmi plexinc/pms-docker
。 If there is a container associated with this image, then you will get an error message like below: 如果有与此图像关联的容器,则会收到如下错误消息:
Error response from daemon: conflict: unable to remove repository reference "plexinc/pms-docker" (must force) - container 92203921146d is using its referenced image f123as324ad
Here 92203921146d
is your conatiner ID. 这里92203921146d
是你的conatiner ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.