-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Which Document page:
On what page is the problem?
Running Services, Environment and Metadata
Expected results:
What are you expecting to see?
An explanation of how environment variables persist when using singularity instances.
Actual results:
What is the problem, what's misspelled, or what's missing?
Environment variables set at instance start are not persisted to singularity exec|shell commands run on that instance. This seems to be by design (ref: apptainer/singularity#5353) but is not mentioned anywhere in the documentation on either instances or environment.
For people moving from Docker to Singularity, singularity instance start can be seen as a docker run equivalent. Variables set at docker run are persisted to later docker exec calls on the same container, so it's a reasonable (if incorrect) assumption that the same would be true for singularity instances. Having the actual behavior directly stated in the docs would be really helpful.