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
• 15,340 points
36 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
• 41,590 points

Related Questions In Docker

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,620 points
137 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 16, 2018 in Docker by Sophie may
• 9,850 points
620 views
0 votes
1 answer

How to remove old Docker containers

There is a new feature in Docker 1.13.x called Docker ...READ MORE

answered Jul 18, 2018 in Docker by Kalgi
• 2,620 points
37 views
0 votes
1 answer

How to deal with persistent storage (e.g. databases) in docker

For Docker 1.9.0 and above, Use volume API docker ...READ MORE

answered Jul 18, 2018 in Docker by Kalgi
• 2,620 points
63 views
0 votes
1 answer
0 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
• 56,900 points
188 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
86 views
0 votes
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
• 41,590 points
74 views