This patch adds --tmpfs as a option for mounting tmpfs on directories
It will Tar up contents of child directory onto tmpfs if mounted over
This patch will use the new PreMount and PostMount hooks to "tar"
up the contents of the base image on top of tmpfs mount points.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 65120e8851
Component: cli
This commit is contained in:
@@ -153,6 +153,14 @@ 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)
|
||||
|
||||
$ 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.
|
||||
|
||||
### Mount volume (-v, --read-only)
|
||||
|
||||
$ docker run -v `pwd`:`pwd` -w `pwd` -i -t ubuntu pwd
|
||||
|
||||
@@ -1298,6 +1298,14 @@ above, or already defined by the developer with a Dockerfile `ENV`:
|
||||
|
||||
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.
|
||||
|
||||
Underlying content from the "container-dir" is copied into tmpfs.
|
||||
|
||||
$ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image
|
||||
|
||||
### VOLUME (shared filesystems)
|
||||
|
||||
-v=[]: Create a bind mount with: [host-src:]container-dest[:<options>], where
|
||||
|
||||
Reference in New Issue
Block a user