Skip to content

Commit 88be588

Browse files
authored
Merge pull request #6709 from vvoland/img-list-all-doc
docs: Update --all flag description to clarify it shows dangling images
2 parents 00e23cf + f7ddc8a commit 88be588

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

cli/command/image/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func newImagesCommand(dockerCLI command.Cli) *cobra.Command {
6565
flags := cmd.Flags()
6666

6767
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only show image IDs")
68-
flags.BoolVarP(&options.all, "all", "a", false, "Show all images (default hides intermediate images)")
68+
flags.BoolVarP(&options.all, "all", "a", false, "Show all images (default hides intermediate and dangling images)")
6969
flags.BoolVar(&options.noTrunc, "no-trunc", false, "Don't truncate output")
7070
flags.BoolVar(&options.showDigests, "digests", false, "Show digests")
7171
flags.StringVar(&options.format, "format", "", flagsHelper.FormatHelp)

contrib/completion/fish/docker.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_pr
315315

316316
# images
317317
complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images'
318-
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (default hides intermediate images)'
318+
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (default hides intermediate and dangling images)'
319319
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l digests -d 'Show digests'
320320
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s f -l filter -d 'Filter output based on conditions provided'
321321
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l format -d 'Format the output using the given Go template'

docs/reference/commandline/image_ls.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ List images
1111

1212
| Name | Type | Default | Description |
1313
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
14-
| `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) |
14+
| `-a`, `--all` | `bool` | | Show all images (default hides intermediate and dangling images) |
1515
| [`--digests`](#digests) | `bool` | | Show digests |
1616
| [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided |
1717
| [`--format`](#format) | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
@@ -32,6 +32,9 @@ decrease disk usage, and speed up `docker build` by
3232
allowing each step to be cached. These intermediate layers are not shown
3333
by default.
3434

35+
Untagged (dangling) images are also hidden by default. Use the `-a` (`--all`)
36+
flag to show intermediate layers and dangling images.
37+
3538
The `SIZE` is the cumulative space taken up by the image and all
3639
its parent images. This is also the disk space used by the contents of the
3740
Tar file created when you `docker save` an image.

docs/reference/commandline/images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ List images
1111

1212
| Name | Type | Default | Description |
1313
|:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
14-
| `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) |
14+
| `-a`, `--all` | `bool` | | Show all images (default hides intermediate and dangling images) |
1515
| `--digests` | `bool` | | Show digests |
1616
| `-f`, `--filter` | `filter` | | Filter output based on conditions provided |
1717
| `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |

0 commit comments

Comments
 (0)