You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows users to submit options similar to the `mount` command when
creating a volume with the `local` volume driver.
For example:
```go
$ docker volume create -d local --opt type=nfs --opt device=myNfsServer:/data --opt o=noatime,nosuid
```
Signed-off-by: Brian Goff <[email protected]>
Copy file name to clipboardExpand all lines: docs/reference/commandline/volume_create.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,12 @@ parent = "smn_cli"
21
21
22
22
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:
23
23
24
-
$ docker volume create --name hello
25
-
hello
24
+
```bash
25
+
$ docker volume create --name hello
26
+
hello
26
27
27
-
$ docker run -d -v hello:/world busybox ls /world
28
+
$ docker run -d -v hello:/world busybox ls /world
29
+
```
28
30
29
31
The mount is created inside the container's `/world` directory. Docker does not support relative paths for mount points inside the container.
30
32
@@ -42,16 +44,32 @@ If you specify a volume name already in use on the current driver, Docker assume
42
44
43
45
Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options:
Copy file name to clipboardExpand all lines: man/docker-volume-create.1.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,9 @@ docker-volume-create - Create a new volume
15
15
16
16
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:
17
17
18
-
```
19
-
$ docker volume create --name hello
20
-
hello
21
-
$ docker run -d -v hello:/world busybox ls /world
22
-
```
18
+
$ docker volume create --name hello
19
+
hello
20
+
$ docker run -d -v hello:/world busybox ls /world
23
21
24
22
The mount is created inside the container's `/src` directory. Docker doesn't not support relative paths for mount points inside the container.
25
23
@@ -29,14 +27,22 @@ Multiple containers can use the same volume in the same time period. This is use
29
27
30
28
Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options:
0 commit comments