Different results between 'docker info' and 'docker ps'


(Tom Hsiung) #1

This is docker info

tomhsiung@toms-server:~$ sudo docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 18.02.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9b55aab90508bd389d7654c4baf173a981477d55
runc version: 9f9c96235cc97674e935002fc3d78361b696a69e
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-112-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.859GiB
Name: toms-server
ID: TJ76:J47D:JQ4Z:2CJ6:AX6H:DDHI:ZBCB:CLP3:PI7J:SVJ4:L6E7:EHG3
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

This is docker ps

tomhsiung@toms-server:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

I encountered a strange issue. Discourse site got lost after server restarting. It seems that the container of app was running but cannot be stopped because when I run the docker start app command the system tell me it had already been running.

tomhsiung@toms-server:~$ sudo docker start app
Error response from daemon: container "c4e83173678012b22a18d932fa818472d49876ed356393929e6a448bb5329246": already exists
Error: failed to start containers: app

But when I used the docker ps command, there was nothing in the container list.

tomhsiung@toms-server:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
tomhsiung@toms-server:~$ 

Because I was not able to start the container app, so the site kept down.

Tom


(Tom Hsiung) #2

After restarting, I removed the Discourse’s app container. Now I created the app container again. But it is alway stopped, despite successfully started.

tomhsiung@toms-server:~$ sudo docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
local_discourse/app   latest              bf08a1640e2b        28 minutes ago      2.86GB
discourse/base        2.0.20171231        3925ef3919cc        6 weeks ago         1.73GB
tomhsiung@toms-server:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
tomhsiung@toms-server:~$ sudo docker start app
app
tomhsiung@toms-server:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
tomhsiung@toms-server:~$ 

Nothing is showed by docker ps.


(Michael Brown) #3

Every version of docker seems to introduce new strange problems - this needs to be reported to the docker team as a bug.

For now if you continue having trouble we would suggest using an earlier version (perhaps 17.06).


(Michael Brown) #4

This topic was automatically closed after 3 hours. New replies are no longer allowed.