How to List Docker containers
How to List Docker containers
2. Run the command ‘docker ps’ to list all running containers
3. Run the command ‘docker ps -a’ to list all running and exited containers
Steps explained:
Open a new terminal and log into your server as root user or as ‘sudo’ user
1. How to list all running and stopped docker containers
Run the below command to see all containers (output include both running and exited containers)
Command :
OR
# docker ps --all

How to list all running and stopped docker containers
2. How to list all running docker containers
docker ps command without any options will show all the containers
Command :

How to list all running docker containers
3. How to list all docker containers and their size
Command to see size of all running containers :
Command to see size of all running and exited containers :
4. How to print only the docker container IDs
Command to print container ID of running containers :
Command to print container ID of running and exited containers :

How to print only the docker container ID
5. How to use filter in docker container list
command to filter only the running instances
# docker ps –filter status=running
6. How to show the latest created container
command to show the latest created container