Skip to content

Nested tmpfs in /tmp #27

@bkauler

Description

@bkauler

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:

pflask --keepenv --mount=tmp:/tmp --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
[✘] Could not create mount dest /mnt/sdc2/containers/sh0/container/tmp/.X11-unix/X0: No such file or directory
[✘] Child failed with code '1'

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions