Skip to content

Commit

Permalink
Fix docs for tmpfs (pr 19688)
Browse files Browse the repository at this point in the history
Underlying files are no longer copied to the tmpfs.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jan 27, 2016
1 parent d789618 commit 386392f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 3 additions & 4 deletions docs/reference/commandline/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
9 changes: 7 additions & 2 deletions docs/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -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[:<options>], where the options are identical to the Linux `mount -t tmpfs -o` command.
```bash
--tmpfs=[]: Create a tmpfs mount with: container-dir[:<options>],
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

Expand Down

0 comments on commit 386392f

Please sign in to comment.