docker:tldr:57696
docker: Filter containers by status (created, running, removing, paused, exited and dead).
$ docker ps --filter="status=${status}"
try on your machine
This command is used to list all the running Docker containers based on a specific status.
The command consists of the following parts:
docker ps
: This is the main command to list the running Docker containers.--filter="status=${status}"
: This is an option to filter the Docker containers based on a specific status. The${status}
is a placeholder that needs to be replaced with the actual status value. For example, if you want to filter containers with the "running" status, you would replace${status}
with"running"
.
By using this command with the appropriate status value, you can view the list of containers matching that status. It's a useful command when you want to filter and see only the containers in a certain state without displaying all containers.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.