Skip to content

Commit e4223e3

Browse files
authored
Merge pull request moby#26830 from dnephin/man-desc-in-files
Move the command description to a markdown file for man pages
2 parents d6e5032 + 78101b2 commit e4223e3

109 files changed

Lines changed: 714 additions & 2454 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cli/command/volume/cmd.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ func NewVolumeCommand(dockerCli *command.DockerCli) *cobra.Command {
1212
cmd := &cobra.Command{
1313
Use: "volume COMMAND",
1414
Short: "Manage volumes",
15-
Long: volumeDescription,
1615
Args: cli.NoArgs,
1716
RunE: dockerCli.ShowHelp,
1817
}
@@ -25,21 +24,3 @@ func NewVolumeCommand(dockerCli *command.DockerCli) *cobra.Command {
2524
)
2625
return cmd
2726
}
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-
`

cli/command/volume/create.go

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
2828
cmd := &cobra.Command{
2929
Use: "create [OPTIONS] [VOLUME]",
3030
Short: "Create a volume",
31-
Long: createDescription,
3231
Args: cli.RequiresMaxArgs(1),
3332
RunE: func(cmd *cobra.Command, args []string) error {
3433
if len(args) == 1 {
@@ -69,42 +68,3 @@ func runCreate(dockerCli *command.DockerCli, opts createOptions) error {
6968
fmt.Fprintf(dockerCli.Out(), "%s\n", vol.Name)
7069
return nil
7170
}
72-
73-
var createDescription = `
74-
Creates a new volume that containers can consume and store data in. If a name
75-
is not specified, Docker generates a random name. You create a volume and then
76-
configure the container to use it, for example:
77-
78-
$ docker volume create hello
79-
hello
80-
$ docker run -d -v hello:/world busybox ls /world
81-
82-
The mount is created inside the container's **/src** directory. Docker doesn't
83-
not support relative paths for mount points inside the container.
84-
85-
Multiple containers can use the same volume in the same time period. This is
86-
useful if two containers need access to shared data. For example, if one
87-
container writes and the other reads the data.
88-
89-
## Driver specific options
90-
91-
Some volume drivers may take options to customize the volume creation. Use the
92-
**-o** or **--opt** flags to pass driver options:
93-
94-
$ docker volume create --driver fake --opt tardis=blue --opt timey=wimey
95-
96-
These options are passed directly to the volume driver. Options for different
97-
volume drivers may do different things (or nothing at all).
98-
99-
The built-in **local** driver on Windows does not support any options.
100-
101-
The built-in **local** driver on Linux accepts options similar to the linux
102-
**mount** command:
103-
104-
$ docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000
105-
106-
Another example:
107-
108-
$ docker volume create --driver local --opt type=btrfs --opt device=/dev/sda2
109-
110-
`

cli/command/volume/inspect.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ func newInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
2020
cmd := &cobra.Command{
2121
Use: "inspect [OPTIONS] VOLUME [VOLUME...]",
2222
Short: "Display detailed information on one or more volumes",
23-
Long: inspectDescription,
2423
Args: cli.RequiresMinArgs(1),
2524
RunE: func(cmd *cobra.Command, args []string) error {
2625
opts.names = args
@@ -45,11 +44,3 @@ func runInspect(dockerCli *command.DockerCli, opts inspectOptions) error {
4544

4645
return inspect.Inspect(dockerCli.Out(), opts.names, opts.format, getVolFunc)
4746
}
48-
49-
var inspectDescription = `
50-
Returns information about one or more volumes. By default, this command renders
51-
all results in a JSON array. You can specify an alternate format to execute a
52-
given template is executed for each result. Go's https://golang.org/pkg/text/template/
53-
package describes all the details of the format.
54-
55-
`

cli/command/volume/list.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
3434
Use: "ls [OPTIONS]",
3535
Aliases: []string{"list"},
3636
Short: "List volumes",
37-
Long: listDescription,
3837
Args: cli.NoArgs,
3938
RunE: func(cmd *cobra.Command, args []string) error {
4039
return runList(dockerCli, opts)
@@ -73,19 +72,3 @@ func runList(dockerCli *command.DockerCli, opts listOptions) error {
7372
}
7473
return formatter.VolumeWrite(volumeCtx, volumes.Volumes)
7574
}
76-
77-
var listDescription = `
78-
79-
Lists all the volumes Docker manages. You can filter using the **-f** or
80-
**--filter** flag. The filtering format is a **key=value** pair. To specify
81-
more than one filter, pass multiple flags (for example,
82-
**--filter "foo=bar" --filter "bif=baz"**)
83-
84-
The currently supported filters are:
85-
86-
* **dangling** (boolean - **true** or **false**, **1** or **0**)
87-
* **driver** (a volume driver's name)
88-
* **label** (**label=<key>** or **label=<key>=<value>**)
89-
* **name** (a volume's name)
90-
91-
`

man/docker-commit.1.md

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)