Home > Software engineering >  Docker documentation - How "filter" option works for container "ls" command?
Docker documentation - How "filter" option works for container "ls" command?

Time:09-13

Here, https://docs.docker.com/engine/reference/commandline/container_ls/, there is the documentation for the "container ls" command.
You can use the "filter" option and this is all it says about it:

--filter , -f Filter output based on conditions provided

Where is it explained how it works?

CodePudding user response:

docker container ls is the same as docker ps, so you can refer to that documentation page for a comprehensive description of that flag:

The filtering flag (-f or --filter) format is a key=value pair. If there is more than one filter, then pass multiple flags (e.g. --filter "foo=bar" --filter "bif=baz")

the doc page also shows a list of all supported filters together with examples

  • Related