Always mount a /run tmpfs in the container

All modern distros set up /run to be a tmpfs, see for instance:
https://wiki.debian.org/ReleaseGoals/RunDirectory

Its a very useful place to store pid-files, sockets and other things
that only live at runtime and that should not be stored in the image.

This is also useful when running systemd inside a container, as it
will try to mount /run if not already mounted, which will fail for
non-privileged container.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 905795ece624675abe2ec2622b0bbafdb9d7f44c
Component: engine
This commit is contained in:
Alexander Larsson
2014-05-07 15:08:52 +02:00
parent ed72957edf
commit 23c5da98b4
3 changed files with 3 additions and 0 deletions

View File

@ -254,6 +254,7 @@ func SetupInitLayer(initLayer string) error {
"/dev/pts": "dir",
"/dev/shm": "dir",
"/proc": "dir",
"/run": "dir",
"/sys": "dir",
"/.dockerinit": "file",
"/.dockerenv": "file",