How to list containers in Docker

0 votes
There's a command to list images, docker images, but there doesn't seem to be a corresponding docker containers.

Other than becoming root and looking into /var/lib/docker is there another way?
Jul 20, 2018 in Docker by Hannah
• 18,540 points
777 views

1 answer to this question.

0 votes

To show only running containers use the given command:

docker ps

To show all containers use the given command:

docker ps -a

To show the latest created container (includes all states) use the given command:

docker ps -l

To show n last created containers (includes all states) use the given command:

docker ps -n=-1

To display total file sizes use the given command:

docker ps -s
answered Jul 20, 2018 by Kalgi
• 52,350 points

Related Questions In Docker

0 votes
1 answer

How to remove all docker containers in a single command?

Hi@akhtar, I don't think there are any pre ...READ MORE

answered Apr 27, 2020 in Docker by MD
• 95,460 points
1,077 views
0 votes
1 answer
0 votes
1 answer

How to store data in external drive with Docker Postgres:9.3 image?

Apparently, the problem would be in your ...READ MORE

answered Jul 12, 2018 in Docker by Kalgi
• 2,680 points
2,592 views
0 votes
1 answer

How to obtain the Docker container's IP address from the host?

This can be done by executing the ...READ MORE

answered Jul 17, 2018 in Docker by Sophie may
• 10,620 points
8,840 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,100 points
2,687 views
+1 vote
2 answers

How to run docker containers on different machines

You can use labels and selectors for ...READ MORE

answered Oct 23, 2018 in Docker by Laila
3,544 views
+1 vote
1 answer

How do I pass environment variables to Docker containers?

You can pass environment variables to your ...READ MORE

answered Jul 20, 2018 in Docker by Kalgi
• 52,350 points
1,649 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP