Labels

The default, if run without any arguments, will show you the container labels file (located at /.singularity.d/labels.json in the container. These labels are the ones that you define in the %labels section of your bootstrap file, along with any Docker LABEL that came with an image that you imported, and other metadata about the bootstrap. For example, here we are inspecting labels for ubuntu.img

Environment

The commands --environment and -e will show you the container’s environment, again specified by the %environment section of a bootstrap file, and other ENV labels that might have come from a Docker import. You can again choose to see --json:

The container in the example above did not have any custom environment variables set.

Test

The equivalent --test or -t commands will print any test defined for the container, which comes from the %test section of the bootstrap specification Singularity file. Again, we can ask for --json or human friendly (default):

The goal of these commands is to bring more transparency to containers, and to help better integrate them into common workflows by having them expose their guts to the world! If you have feedback for how we can improve or amend this, please let us know!