Linked Questions

Popular Questions

According to tutorial I read so far, use "docker run -d" will start a container from image, and the container will run in background. This is how it looks like, we can see we already have container id.

[email protected]:/home/root# docker run -d centos

But if I ran "docker ps", nothing was returned.

So I tried "docker ps -a", I can see container already exited:

[email protected]:/home/root# docker ps -a
CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                         PORTS               NAMES
605e3928cddd        centos:latest         "/bin/bash"         31 minutes ago      Exited (0) 31 minutes ago                          kickass_swartz

Anything I did wrong? How can I troubleshoot this issue?

Related Questions