Skip to content

add initial support for --tmp-mount flag - #14553

Open
andrewsykim wants to merge 2 commits into
google:masterfrom
andrewsykim:tmpfs
Open

add initial support for --tmp-mount flag#14553
andrewsykim wants to merge 2 commits into
google:masterfrom
andrewsykim:tmpfs

Conversation

@andrewsykim

Copy link
Copy Markdown

fixes #14474

Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>

@adi-IL adi-IL left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on Linux x86_64.

Exposing --tmp-mount (auto, tmpfs, rootfs) in runsc/config gives containers control over /tmp mounting behavior. In mountTmp (runsc/boot/vfs.go), honoring rootfs avoids shadowing pre-populated /tmp directories from container layers, while tmpfs forces an in-memory tmpfs mount even when /tmp contains existing files. Flag parsing and spec configuration tests in specutils_test.go pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runsc: no way to keep /tmp on the rootfs when the image's /tmp is empty (EXDEV vs Docker)

2 participants