singularity icon indicating copy to clipboard operation
singularity copied to clipboard

Invalid environment variable name prevents running container

Open benmishkanian opened this issue 5 years ago • 6 comments

Version of Singularity:

3.1.0-1.el7.centos

Expected behavior

According to IEEE Std 1003.1-2001, environment variables may contain any character except '=', even though some shells such as Bash do not support certain characters (such as '.') in environment variable names. Docker allows using '.' in the name of an ENV variable, even if the ENTRYPOINT is Bash. Running such a Docker container still works, and Bash does not crash. Singularity containers built from such Docker images should work correctly even if the container's shell does not support such environment variable names.

Actual behavior

Singularity containers built from Docker images that have an ENV variable with a '.' character in the name crash when starting Bash.

Steps to reproduce behavior

Create a Singularity container from the Docker image jsreport/jsreport:2.5.0 (available on Docker Hub) and try to run it. It fails with the following error:

-bash: export: `chrome:launchOptions:executablePath=abc': not a valid identifier

benmishkanian avatar Jul 23 '19 20:07 benmishkanian

@amjad you said this issue is fixed in https://github.com/sylabs/singularity/pull/4398#issuecomment-529466896, but I still can reproduce it by running

$ singularity shell docker://jsreport/jsreport:2.5.0

sashayakovtseva avatar Sep 09 '19 15:09 sashayakovtseva

@sashayakovtseva Yes i just tested it . Just a question can we use os.Setenv() while creating the docker2singularity.sh? .What would be the implications of such step ? obviously export will not work ?

Amjadhpc avatar Oct 03 '19 15:10 Amjadhpc

Hello,

This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.

Please consider the following:

  1. Is this issue a duplicate, or has it been fixed/implemented since being added?
  2. Is the issue still relevant to the current state of Singularity's functionality?
  3. Would you like to continue discussing this issue or feature request?

Thanks, Carter

carterpeel avatar May 15 '21 16:05 carterpeel

This issue has been automatically marked as stale because it has not had activity in over 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 14 '21 20:07 stale[bot]

@benmishkanian Still getting this problem ? Have this been solved already ? If yes, what work around have you followed and applied ?

We're looking into the issue carefully, soon will bring to community and discuss ways to better solve as well address this. Thankyou for keeping the interest in the subject.

pedroalvesbatista avatar Jul 16 '21 00:07 pedroalvesbatista

I don't know. I stopped using Singularity a long time ago and no longer have access to an HPC cluster.

benmishkanian avatar Jul 16 '21 07:07 benmishkanian

Singularity repo is now retired as the code base is now moved to Apptainer. We are closing all the old issues under the old Singularity repo. For further assistance please open a new issue under the new Apptainer repo. Thanks for your support.

kmuriki avatar Oct 17 '22 03:10 kmuriki