Singularity by default exposes all environment variables from the host inside the container. Use the `--cleanenv` argument to prevent this:
```bash
singularity run --cleanenv <image.sif> <arg-1> <arg-2> ... <arg-N>
```
#### Setting Environment variables
One can define an environment variable within the container as follows:
```bash
export SINGULARITYENV_MYVAR=Overridden
```
With the above definition, `MYVAR` will have the value "Overridden".
### Inspect
One can sometimes learn a lot about the image by inspecting its definition file:
```bash
singularity inspect --deffile <image.sif>
```
The definition file is the recipe by which the image was made (see below). If the image was taken from Docker Hub then a definition file will not be available.