Browse code

Fix docs for tmpfs (pr 19688)

Underlying files are no longer copied to the tmpfs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/01/27 10:39:13
Showing 2 changed files
... ...
@@ -163,13 +163,12 @@ flag exists to allow special use-cases, like running Docker within Docker.
163 163
 The `-w` lets the command being executed inside directory given, here
164 164
 `/path/to/dir/`. If the path does not exists it is created inside the container.
165 165
 
166
-### mount tmpfs (--tmpfs)
166
+### Mount tmpfs (--tmpfs)
167 167
 
168 168
     $ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image
169 169
 
170
-    The --tmpfs flag mounts a tmpfs into the container with the rw,noexec,nosuid,size=65536k options.
171
-
172
-    Underlying content from the /run in the my_image image is copied into tmpfs.
170
+The `--tmpfs` flag mounts an empty tmpfs into the container with the `rw`,
171
+`noexec`, `nosuid`, `size=65536k` options.
173 172
 
174 173
 ### Mount volume (-v, --read-only)
175 174
 
... ...
@@ -1365,9 +1365,14 @@ Similarly the operator can set the **hostname** with `-h`.
1365 1365
 
1366 1366
 ### TMPFS (mount tmpfs filesystems)
1367 1367
 
1368
-    --tmpfs=[]: Create a tmpfs mount with: container-dir[:<options>], where the options are identical to the Linux `mount -t tmpfs -o` command.
1368
+```bash
1369
+--tmpfs=[]: Create a tmpfs mount with: container-dir[:<options>],
1370
+            where the options are identical to the Linux
1371
+            'mount -t tmpfs -o' command.
1372
+```
1369 1373
 
1370
-    Underlying content from the "container-dir" is copied into tmpfs.
1374
+The example below mounts an empty tmpfs into the container with the `rw`,
1375
+`noexec`, `nosuid`, and `size=65536k` options.
1371 1376
 
1372 1377
     $ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image
1373 1378