Signed-off-by: Nico <nicolaka@gmail.com>
| ... | ... |
@@ -54,17 +54,24 @@ different volume drivers may do different things (or nothing at all). |
| 54 | 54 |
|
| 55 | 55 |
The built-in `local` driver on Windows does not support any options. |
| 56 | 56 |
|
| 57 |
-The built-in `local` driver on Linux accepts options similar to the linux `mount` |
|
| 58 |
-command: |
|
| 57 |
+The built-in `local` driver on Linux accepts options similar to the linux `mount` command. You can provide multiple options by passing the `--opt` flag multiple times. Some `mount` options (such as the `o` option) can take a comma-separated list of options. Complete list of available mount options can be found [here](http://man7.org/linux/man-pages/man8/mount.8.html). |
|
| 58 |
+ |
|
| 59 |
+For example, the following creates a `tmpfs` volume called `foo` with a size of 100 megabyte and `uid` of 1000. |
|
| 59 | 60 |
|
| 60 | 61 |
```bash |
| 61 |
-$ docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 |
|
| 62 |
+$ docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 --name foo |
|
| 62 | 63 |
``` |
| 63 | 64 |
|
| 64 |
-Another example: |
|
| 65 |
+Another example that uses `btrfs`: |
|
| 65 | 66 |
|
| 66 | 67 |
```bash |
| 67 |
-$ docker volume create --driver local --opt type=btrfs --opt device=/dev/sda2 |
|
| 68 |
+$ docker volume create --driver local --opt type=btrfs --opt device=/dev/sda2 --name foo |
|
| 69 |
+``` |
|
| 70 |
+ |
|
| 71 |
+Another example that uses `nfs` to mount the `/path/to/dir` in `rw` mode from `192.168.1.1`: |
|
| 72 |
+ |
|
| 73 |
+```bash |
|
| 74 |
+$ docker volume create --driver local --opt type=nfs --opt o=addr=192.168.1.1,rw --opt device=:/path/to/dir --name foo |
|
| 68 | 75 |
``` |
| 69 | 76 |
|
| 70 | 77 |
|