Hi Oriol,
there are several in fact:
(slc)Thomas.Maier@gar-ws-etp07:~>env | grep SINGULARITY
SINGULARITY_libexecdir=/usr/local/libexec
SINGULARITY_localstatedir=/usr/local/var
SINGULARITY_INIT=1
SINGULARITY_sysconfdir=/etc
SINGULARITY_CONTAINER=cern-slc6-05.05.2017.img
SINGULARITY_IMAGE=/project/etp3/ThomasMaier/Singularity/versions/cern-slc6-05.05.2017.img
I'm still using version 2.2.1, so it might look a bit different for newer version, but in general variables beginning with "SINGULARITY" are set by singularity when opening a shell or executing a command within the singularity image (assuming you haven't set it yourself, of course). You might want to check yourself what you get when you're inside the singularity image or running 'singularity exec'.
If one of the devs has a good recommendation for what to use, they can comment as well of course :).
Cheers
Thomas