Skip to content

Commit

Permalink
Merge pull request moby#26830 from dnephin/man-desc-in-files
Browse files Browse the repository at this point in the history
Move the command description to a markdown file for man pages
  • Loading branch information
thaJeztah authored Jan 3, 2017
2 parents d6e5032 + 78101b2 commit e4223e3
Show file tree
Hide file tree
Showing 109 changed files with 714 additions and 2,454 deletions.
19 changes: 0 additions & 19 deletions cli/command/volume/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ func NewVolumeCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{
Use: "volume COMMAND",
Short: "Manage volumes",
Long: volumeDescription,
Args: cli.NoArgs,
RunE: dockerCli.ShowHelp,
}
Expand All @@ -25,21 +24,3 @@ func NewVolumeCommand(dockerCli *command.DockerCli) *cobra.Command {
)
return cmd
}

var volumeDescription = `
The **docker volume** command has subcommands for managing data volumes. A data
volume is a specially-designated directory that by-passes storage driver
management.
Data volumes persist data independent of a container's life cycle. When you
delete a container, the Docker daemon does not delete any data volumes. You can
share volumes across multiple containers. Moreover, you can share data volumes
with other computing resources in your system.
To see help for a subcommand, use:
docker volume COMMAND --help
For full details on using docker volume visit Docker's online documentation.
`
40 changes: 0 additions & 40 deletions cli/command/volume/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{
Use: "create [OPTIONS] [VOLUME]",
Short: "Create a volume",
Long: createDescription,
Args: cli.RequiresMaxArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 1 {
Expand Down Expand Up @@ -69,42 +68,3 @@ func runCreate(dockerCli *command.DockerCli, opts createOptions) error {
fmt.Fprintf(dockerCli.Out(), "%s\n", vol.Name)
return nil
}

var createDescription = `
Creates a new volume that containers can consume and store data in. If a name
is not specified, Docker generates a random name. You create a volume and then
configure the container to use it, for example:
$ docker volume create hello
hello
$ docker run -d -v hello:/world busybox ls /world
The mount is created inside the container's **/src** directory. Docker doesn't
not support relative paths for mount points inside the container.
Multiple containers can use the same volume in the same time period. This is
useful if two containers need access to shared data. For example, if one
container writes and the other reads the data.
## Driver specific options
Some volume drivers may take options to customize the volume creation. Use the
**-o** or **--opt** flags to pass driver options:
$ docker volume create --driver fake --opt tardis=blue --opt timey=wimey
These options are passed directly to the volume driver. Options for different
volume drivers may do different things (or nothing at all).
The built-in **local** driver on Windows does not support any options.
The built-in **local** driver on Linux accepts options similar to the linux
**mount** command:
$ docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000
Another example:
$ docker volume create --driver local --opt type=btrfs --opt device=/dev/sda2
`
9 changes: 0 additions & 9 deletions cli/command/volume/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func newInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{
Use: "inspect [OPTIONS] VOLUME [VOLUME...]",
Short: "Display detailed information on one or more volumes",
Long: inspectDescription,
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts.names = args
Expand All @@ -45,11 +44,3 @@ func runInspect(dockerCli *command.DockerCli, opts inspectOptions) error {

return inspect.Inspect(dockerCli.Out(), opts.names, opts.format, getVolFunc)
}

var inspectDescription = `
Returns information about one or more volumes. By default, this command renders
all results in a JSON array. You can specify an alternate format to execute a
given template is executed for each result. Go's https://golang.org/pkg/text/template/
package describes all the details of the format.
`
17 changes: 0 additions & 17 deletions cli/command/volume/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
Use: "ls [OPTIONS]",
Aliases: []string{"list"},
Short: "List volumes",
Long: listDescription,
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
return runList(dockerCli, opts)
Expand Down Expand Up @@ -73,19 +72,3 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error {
}
return formatter.VolumeWrite(volumeCtx, volumes.Volumes)
}

var listDescription = `
Lists all the volumes Docker manages. You can filter using the **-f** or
**--filter** flag. The filtering format is a **key=value** pair. To specify
more than one filter, pass multiple flags (for example,
**--filter "foo=bar" --filter "bif=baz"**)
The currently supported filters are:
* **dangling** (boolean - **true** or **false**, **1** or **0**)
* **driver** (a volume driver's name)
* **label** (**label=<key>** or **label=<key>=<value>**)
* **name** (a volume's name)
`
71 changes: 0 additions & 71 deletions man/docker-commit.1.md

This file was deleted.

Loading

0 comments on commit e4223e3

Please sign in to comment.