Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/reference/commandline/image_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ The currently supported filters are:
* since (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filter images created since given id or references
* reference (pattern of an image reference) - filter images whose reference matches the specified pattern

These keys are **not** the same set as `docker image prune --filter`. Prune
supports `until` and `label` / `label!=...`, but not `dangling`, `before`,
`since`, or `reference`. Negative label filters (`label!=...`) work with prune
but not with `docker image ls`, so you cannot always preview prune matches with
`image ls`. See [docker image prune](image_prune.md#filter).

#### Show untagged images (dangling)

```console
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/image_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ The currently supported filters are:
* until (`<timestamp>`) - only remove images created before given timestamp
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove images with (or without, in case `label!=...` is used) the specified labels.

`docker image ls --filter` uses a different key set (`dangling`, `label`,
`before`, `since`, `reference`) and does not accept `until` or `label!=...`.
Do not assume the two commands share filter syntax.

The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings supported by [ParseDuration](https://pkg.go.dev/time#ParseDuration) (e.g. `10m`, `1h30m`) computed
relative to the daemon machine’s time. Supported formats for date
Expand Down