diff --git a/cli/command/image/list.go b/cli/command/image/list.go index b06e5c1779cd..6e0675c8f8b7 100644 --- a/cli/command/image/list.go +++ b/cli/command/image/list.go @@ -65,7 +65,7 @@ func newImagesCommand(dockerCLI command.Cli) *cobra.Command { flags := cmd.Flags() flags.BoolVarP(&options.quiet, "quiet", "q", false, "Only show image IDs") - flags.BoolVarP(&options.all, "all", "a", false, "Show all images (default hides intermediate images)") + flags.BoolVarP(&options.all, "all", "a", false, "Show all images (default hides intermediate and dangling images)") flags.BoolVar(&options.noTrunc, "no-trunc", false, "Don't truncate output") flags.BoolVar(&options.showDigests, "digests", false, "Show digests") flags.StringVar(&options.format, "format", "", flagsHelper.FormatHelp) diff --git a/contrib/completion/fish/docker.fish b/contrib/completion/fish/docker.fish index 6cb4df7856d4..8a127cf9a7fe 100644 --- a/contrib/completion/fish/docker.fish +++ b/contrib/completion/fish/docker.fish @@ -315,7 +315,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_pr # images complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images' -complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (default hides intermediate images)' +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)' complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l digests -d 'Show digests' complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s f -l filter -d 'Filter output based on conditions provided' complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l format -d 'Format the output using the given Go template' diff --git a/docs/reference/commandline/image_ls.md b/docs/reference/commandline/image_ls.md index 925b6993bccd..b600dd75bd21 100644 --- a/docs/reference/commandline/image_ls.md +++ b/docs/reference/commandline/image_ls.md @@ -11,7 +11,7 @@ List images | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) | +| `-a`, `--all` | `bool` | | Show all images (default hides intermediate and dangling images) | | [`--digests`](#digests) | `bool` | | Show digests | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
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 allowing each step to be cached. These intermediate layers are not shown by default. +Untagged (dangling) images are also hidden by default. Use the `-a` (`--all`) +flag to show intermediate layers and dangling images. + The `SIZE` is the cumulative space taken up by the image and all its parent images. This is also the disk space used by the contents of the Tar file created when you `docker save` an image. diff --git a/docs/reference/commandline/images.md b/docs/reference/commandline/images.md index 8d615ec21b10..5bd26b2868fd 100644 --- a/docs/reference/commandline/images.md +++ b/docs/reference/commandline/images.md @@ -11,7 +11,7 @@ List images | Name | Type | Default | Description | |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) | +| `-a`, `--all` | `bool` | | Show all images (default hides intermediate and dangling images) | | `--digests` | `bool` | | Show digests | | `-f`, `--filter` | `filter` | | Filter output based on conditions provided | | `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |