FreeKB - docker ps command (processes)
Docker - docker ps command (processes)

This assumes you have installed Docker on Linux and Docker is running. The docker ps command will return the running containers.

docker ps

 

Which will return something like this. If the container was created but not yet started, the status of the container will be "created".

CONTAINER ID     IMAGE              COMMAND                 CREATED         STATUS     PORTS     NAMES
d937372c09ab9    b939aa938add9913   "/docker-entrypoin..."  6 minutes ago   Created              my-container

 

After using the docker start command to start the container, the status of the container should either be "up xxx" or "exited". If the container is up, the socket (ip address:port) being used by the container will be displayed. If the status is "exited", use the docker logs command to determine why the container failed to start.

CONTAINER ID     IMAGE              COMMAND                 CREATED       STATUS        PORTS     NAMES
d937372c09ab9    b939aa938add9913   "/docker-entrypoin..."  6 minutes ago Up 30 seconds 0.0.0.0:12345->12345/tcp

 

The docker ps -a command returns both running and inactive containers.

docker ps -a

 

If the status of the container is "Exited (1)", attempt to start the container using the docker start command. If the container still has a status of Exited, check the docker logs.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 0362b in the box below so that we can be sure you are a human.




Comments