Background
I have a singularity container that was created from a docker image. The docker image has files that are meant to be in the user's home directory (e.g. in $HOME/.files
). Because I don't know what the username will be, I put the files in /opt
in the container and want to set the user's home to /opt
.
I would like to be able to run the container with /opt
as the home directory, OR somehow be able to run the container so that the home directory contains the files that already exist within the container
What I have tried:
- use the
--home
flag : This maps a folder on the host as the home directory, rather than a folder in the container. - try overriding the
$HOME
environment variable with--env HOME=/opt
: I get the errorOverriding HOME environment variable with SINGULARITYENV_HOME is not permitted
Other questions
this question is related, but interested in mapping the container's home folder to a folder on the host machine