github.com/kunnos/engine@v1.13.1/cli/command/volume/cmd.go (about) 1 package volume 2 3 import ( 4 "github.com/spf13/cobra" 5 6 "github.com/docker/docker/cli" 7 "github.com/docker/docker/cli/command" 8 ) 9 10 // NewVolumeCommand returns a cobra command for `volume` subcommands 11 func NewVolumeCommand(dockerCli *command.DockerCli) *cobra.Command { 12 cmd := &cobra.Command{ 13 Use: "volume COMMAND", 14 Short: "Manage volumes", 15 Long: volumeDescription, 16 Args: cli.NoArgs, 17 RunE: dockerCli.ShowHelp, 18 } 19 cmd.AddCommand( 20 newCreateCommand(dockerCli), 21 newInspectCommand(dockerCli), 22 newListCommand(dockerCli), 23 newRemoveCommand(dockerCli), 24 NewPruneCommand(dockerCli), 25 ) 26 return cmd 27 } 28 29 var volumeDescription = ` 30 The **docker volume** command has subcommands for managing data volumes. A data 31 volume is a specially-designated directory that by-passes storage driver 32 management. 33 34 Data volumes persist data independent of a container's life cycle. When you 35 delete a container, the Docker daemon does not delete any data volumes. You can 36 share volumes across multiple containers. Moreover, you can share data volumes 37 with other computing resources in your system. 38 39 To see help for a subcommand, use: 40 41 docker volume COMMAND --help 42 43 For full details on using docker volume visit Docker's online documentation. 44 45 `