tmpfs mount for host $HOME path in OCI mode container with different USER in container #3460
Unanswered
nathanweeks
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When running an OCI container that was created from a Dockerfile containing a USER instruction, where the specified user in the container has a different $HOME path than the host user, SingularityCE 4.2.2 still defaults to mounting a tmpfs at a path inside the container corresponding to $HOME on the host; e.g., on Rocky Linux 8.10, given the following Dockerfile (based on the example at https://docs.sylabs.io/guides/4.2/user-guide/oci_runtime.html#pulling-and-running-oci-containers):
A container that uses this OCI-SIF has a tmpfs mounted at /home/rocky (in this case) that isn't writable by the USER specified in the Dockerfile (due to differing uid/gid):
This default doesn't seem overly useful, though I suppose would it would normally be innocuous (if exposing the pathname of the home directory on the host isn't a concern). Except on a Rocky Linux 8.9 cluster with NFS-mounted home directories (but not the standalone VM used in the above example), I encountered an error pertaining to this tmpfs mount when the Dockerfile contained
USER root
(which could be worked around with--fakeroot
or--no-home
as demonstrated below):Before going through the effort of attempting to track down the root cause of the error (if it isn't already obvious to the SingularityCE developers), I was wondering if the tmpfs mount based on the home directory path on the host is warranted in this case, or could be "optimized" away by default?
Beta Was this translation helpful? Give feedback.
All reactions