mirror of https://github.com/docker/cli.git
Clarify description of volume prune command
volume prune command removes only local volumes not used by at least one container. Signed-off-by: Sungwon Han <sungwon.han@navercorp.com>
This commit is contained in:
parent
b5df4f69db
commit
34504d0a1e
|
@ -22,7 +22,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "prune [OPTIONS]",
|
Use: "prune [OPTIONS]",
|
||||||
Short: "Remove all unused volumes",
|
Short: "Remove all unused local volumes",
|
||||||
Args: cli.NoArgs,
|
Args: cli.NoArgs,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
spaceReclaimed, output, err := runPrune(dockerCli, options)
|
spaceReclaimed, output, err := runPrune(dockerCli, options)
|
||||||
|
@ -45,7 +45,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
const warning = `WARNING! This will remove all volumes not used by at least one container.
|
const warning = `WARNING! This will remove all local volumes not used by at least one container.
|
||||||
Are you sure you want to continue?`
|
Are you sure you want to continue?`
|
||||||
|
|
||||||
func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint64, output string, err error) {
|
func runPrune(dockerCli command.Cli, options pruneOptions) (spaceReclaimed uint64, output string, err error) {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
WARNING! This will remove all volumes not used by at least one container.
|
WARNING! This will remove all local volumes not used by at least one container.
|
||||||
Are you sure you want to continue? [y/N] Total reclaimed space: 0B
|
Are you sure you want to continue? [y/N] Total reclaimed space: 0B
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
WARNING! This will remove all volumes not used by at least one container.
|
WARNING! This will remove all local volumes not used by at least one container.
|
||||||
Are you sure you want to continue? [y/N] Deleted Volumes:
|
Are you sure you want to continue? [y/N] Deleted Volumes:
|
||||||
foo
|
foo
|
||||||
bar
|
bar
|
||||||
|
|
|
@ -110,7 +110,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
||||||
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
|
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
|
||||||
| [volume inspect](volume_inspect.md) | Display information about a volume |
|
| [volume inspect](volume_inspect.md) | Display information about a volume |
|
||||||
| [volume ls](volume_ls.md) | Lists all the volumes Docker knows about |
|
| [volume ls](volume_ls.md) | Lists all the volumes Docker knows about |
|
||||||
| [volume prune](volume_prune.md) | Remove all unused volumes |
|
| [volume prune](volume_prune.md) | Remove all unused local volumes |
|
||||||
| [volume rm](volume_rm.md) | Remove one or more volumes |
|
| [volume rm](volume_rm.md) | Remove one or more volumes |
|
||||||
|
|
||||||
### Swarm node commands
|
### Swarm node commands
|
||||||
|
|
|
@ -27,7 +27,7 @@ Commands:
|
||||||
create Create a volume
|
create Create a volume
|
||||||
inspect Display detailed information on one or more volumes
|
inspect Display detailed information on one or more volumes
|
||||||
ls List volumes
|
ls List volumes
|
||||||
prune Remove all unused volumes
|
prune Remove all unused local volumes
|
||||||
rm Remove one or more volumes
|
rm Remove one or more volumes
|
||||||
|
|
||||||
Run 'docker volume COMMAND --help' for more information on a command.
|
Run 'docker volume COMMAND --help' for more information on a command.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "volume prune"
|
title: "volume prune"
|
||||||
description: "Remove unused volumes"
|
description: "Remove unused local volumes"
|
||||||
keywords: "volume, prune, delete"
|
keywords: "volume, prune, delete"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ keywords: "volume, prune, delete"
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker volume prune [OPTIONS]
|
Usage: docker volume prune [OPTIONS]
|
||||||
|
|
||||||
Remove all unused volumes
|
Remove all unused local volumes
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--filter filter Provide filter values (e.g. 'label=<label>')
|
--filter filter Provide filter values (e.g. 'label=<label>')
|
||||||
|
@ -28,14 +28,14 @@ Options:
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Remove all unused volumes. Unused volumes are those which are not referenced by any containers
|
Remove all unused local volumes. Unused local volumes are those which are not referenced by any containers
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker volume prune
|
$ docker volume prune
|
||||||
|
|
||||||
WARNING! This will remove all volumes not used by at least one container.
|
WARNING! This will remove all local volumes not used by at least one container.
|
||||||
Are you sure you want to continue? [y/N] y
|
Are you sure you want to continue? [y/N] y
|
||||||
Deleted Volumes:
|
Deleted Volumes:
|
||||||
07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e
|
07c7bdf3e34ab76d921894c2b834f073721fccfbbcba792aa7648e3a7a664c2e
|
||||||
|
|
Loading…
Reference in New Issue