docker / docker/docs

Make it clear that docker ps filter name accepts regular expressions

Open
#11,767 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/cli lifecycle/frozen
Dominant language
Markdown
Stars
4.7k
Forks
8.5k
Avg merge
2d 18h
Merged PRs (30d)
108

Description

Problem description

Docker ps command filtering option allows using regular expressions in its name parameter, while by the docs by it seems only strings are allowed and that it:

matches on all or part of a container’s name

Problem location
Project version(s) affected

I already checked this on 19.03.11, where I have two identically prefixed containers:

  • app
  • app_stage

Here

docker ps -a --filter name=app

returns both, while:

docker ps -a --filter name=^app$ 

only returns the first one.

Suggestions for a fix

Clarify that, at least for the name filter option, a regular expression may be specified.
I learned that from this comment.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Docker Engine CLI reference section for the name filter: https://docs-stage.docker.com/engine/reference/commandline/ps/#name. Review the existing wording against the reported app and ^app$ examples. Done means the documentation clearly states that the name filter accepts regular expressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.