-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested tmpfs in /tmp #27
Comments
I think the problem is that the Having an option in pflask like I really don't have the time to dedicate to this unfortunately. |
Thanks for the feedback. Yes, I understood that, and everything was fine, until today, November 6! Suddenly, pflask has decided to mount a tmpfs on /tmp, without me telling it to, so now this fails:
Exactly the same thing worked up until today! Changing this part, it works:
And then inside the container, I see that /tmp has been mounted:
As you are much more familiar than how how pflask works, can you think what might have made pflask mount /tmp? |
Bingo! Obviously, there had to be some difference between yesterday and today. I am booting my test builds of Linux off USB sticks, so I booted up "yesterdays" stick. Exactly the same invocation of pflask, running "mount" inside the container, there is this very significant difference:
That is, pflask mounts tmpfs on /run, not /tmp. Ah, "todays" stick does not have the /run folder, so created that before starting the container.... yippee, now works, /run is mounted. not /tmp So, this is a feature of pflask, not to be considered a bug? Anyway, I'm a happy chappy now that it is working again. Thanks for pflask, it is a very elegant way to implement simple containers. |
An extra comment. The container that mounted /tmp does actually have /run, but it is a symlink into /tmp/run. There was no problem with this before, it is only today that pflask is insisting that /run be an actual folder not a symlink. Which is very odd. |
Well, there haven't been any changes to pflask since January, so I don't think pflask changed its behavior (and pflask itself doesn't mount anything on /tmp if you don't tell it to). Might be something else that changed though, systemd? linux? |
Pflask does not mount a tmpfs on /tmp in the container. I did this, which works:
pflask --keepenv --mount=bind:/tmp/.X11-unix/X0:/tmp/.X11-unix/X0 --no-utsns --no-ipcns --no-netns --caps=all,-sys_admin,-sys_boot,-sys_chroot,-sys_ptrace,-sys_time,-sys_tty_config,-chown,-kill,-dac_override,-dac_read_search,-fowner,-setfcap,-setpcap,-net_admin,-mknod,-sys_module,-sys_nice,-sys_resource --no-userns --chroot=/mnt/sdc2/containers/sh0/container -- /ec-run sh0 sakura
...the relevant part is "--mount=bind:/tmp/.X11-unix/X0:/tmp/.X11-unix/X0", don't bother about the rest of the line.
However, what I would prefer is to mount a tmpfs on /tmp, then do the X0 bind:
Am I being unrealistic here? Is this just the way it works, or could the code be made to accommodate what I have tried to do? I don't want to bind the entire host /tmp into the container.
The text was updated successfully, but these errors were encountered: