Singularity container cannot find files after being created from a Docker image #2500
Replies: 1 comment 2 replies
-
Converted to a discussion as this is not a bug or feature request. Your Dockerfile installs various things into the default home directory in the container. This will be Singularity is different to Docker with home directory handling:
There are flags to stop Singularity binding the home directory for the host, and to override the home directory in the container. Search Generally images that depend on things that are in the home directory of the container image will not work correctly under Singularity without some of these additional flags being specified. If you need to use a Docker container with Singularity it is best, instead, to write it so that no software / configuration is places in the home directory in the Docker build. I would advise reviewing the Docker compatibility section of the user guide, or investigating the new OCI-mode in Singularity 4.0+ - which behaves more like Docker. |
Beta Was this translation helpful? Give feedback.
-
Version of Apptainer
What version of Apptainer (or Singularity) are you using? Run
apptainer --version
(orsingularity --version
).singularity-ce version 4.0.2
Description of issue
I have posted the same question on SO too - https://stackoverflow.com/questions/77781660/singularity-container-cannot-find-files-after-being-created-from-a-docker-image
I am creating a Singularity container from a Docker image. However, the Singularity container gives me errors that weren't present while I used Docker.
This is how I create my Docker image -
This is how I build, run and test my Docker image -
Once inside the container -
This works (except for a few warnings).
Then, I build a Singularity container from the Docker image -
This is how I run the Singularity container -
But then I get this error over here -
What OS/distro are you running
How did you install Apptainer
I installed Singularity. I followed the documentation given over here - https://docs.sylabs.io/guides/3.0/user-guide/installation.html
Beta Was this translation helpful? Give feedback.
All reactions