docker:tldr:37ecf
docker: Filter containers that contain a substring in their name.
$ docker ps --filter="name=${name}"
try on your machine
This command is used to filter the list of running Docker containers based on the container name. Here's a breakdown of the command: - docker ps
: This is the command to list all running containers in your Docker environment.
--filter="name=${name}"
: This is an option used to filter the list of containers based on a specific parameter, which in this case is the container name. The${name}
is a placeholder for the actual container name you want to filter with. For example, if you want to list all running containers that have the name "my-container", you would run the command: ``` docker ps --filter="name=my-container"
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.