Move tar copy-up for tmpfs mounts

We cannot rely on the tar command for this type of operation because tar
versions, flags, and functionality can very from distro to distro.
Since this is in the container execution path it is not safe to have
this as a dependency from dockers POV where the user cannot change the
fact that docker is adding these pre and post mount commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-01-25 14:48:23 -08:00 committed by Tibor Vass
parent 7910f01804
commit 9796beeedb
2 changed files with 2 additions and 8 deletions

View File

@ -319,10 +319,7 @@ unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
$ docker run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image
This command mounts a `tmpfs` at `/tmp` within the container. The mount copies
the underlying content of `my_image` into `/tmp`. For example if there was a
directory `/tmp/content` in the base image, docker will copy this directory and
all of its content on top of the tmpfs mounted on `/tmp`. The supported mount
This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
options are the same as the Linux default `mount` flags. If you do not specify
any options, the systems uses the following options:
`rw,noexec,nosuid,nodev,size=65536k`.

View File

@ -490,10 +490,7 @@ standard input.
$ docker run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image
This command mounts a `tmpfs` at `/tmp` within the container. The mount copies
the underlying content of `my_image` into `/tmp`. For example if there was a
directory `/tmp/content` in the base image, docker will copy this directory and
all of its content on top of the tmpfs mounted on `/tmp`. The supported mount
This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
options are the same as the Linux default `mount` flags. If you do not specify
any options, the systems uses the following options:
`rw,noexec,nosuid,nodev,size=65536k`.