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 605e3928cdddb844526bab691af51d0c9262e0a1fc3d41de3f59be1a58e1bd1d
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?