From c9417fac955d1367ae50aed6baaeebbbfc1c8067 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 26 Jan 2016 17:39:13 -0800 Subject: [PATCH] Fix docs for tmpfs (pr 19688) Underlying files are no longer copied to the tmpfs. Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/run.md | 7 +++---- docs/reference/run.md | 9 +++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 258290369f..dce1019f19 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -163,13 +163,12 @@ flag exists to allow special use-cases, like running Docker within Docker. The `-w` lets the command being executed inside directory given, here `/path/to/dir/`. If the path does not exists it is created inside the container. -### mount tmpfs (--tmpfs) +### Mount tmpfs (--tmpfs) $ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image - The --tmpfs flag mounts a tmpfs into the container with the rw,noexec,nosuid,size=65536k options. - - Underlying content from the /run in the my_image image is copied into tmpfs. +The `--tmpfs` flag mounts an empty tmpfs into the container with the `rw`, +`noexec`, `nosuid`, `size=65536k` options. ### Mount volume (-v, --read-only) diff --git a/docs/reference/run.md b/docs/reference/run.md index 02dbe79289..e38fd1f18d 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -1365,9 +1365,14 @@ Similarly the operator can set the **hostname** with `-h`. ### TMPFS (mount tmpfs filesystems) - --tmpfs=[]: Create a tmpfs mount with: container-dir[:], where the options are identical to the Linux `mount -t tmpfs -o` command. +```bash +--tmpfs=[]: Create a tmpfs mount with: container-dir[:], + where the options are identical to the Linux + 'mount -t tmpfs -o' command. +``` - Underlying content from the "container-dir" is copied into tmpfs. +The example below mounts an empty tmpfs into the container with the `rw`, +`noexec`, `nosuid`, and `size=65536k` options. $ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image