singularity-test man page

singularity-test — Run the user-defined tests within a container


singularity test [exec options...] <image path>


The 'test' command allows you to execute a testscript (if available) inside of
 a given container

     For instances if there is a daemon process running inside the container,
     then subsequent container commands will all run within the same
     namespaces. This means that the --writable and --contain options will not
     be honored as the namespaces have already been configured by the
     'singularity start' command.



a comma separated capability list to add


allow setuid binaries in container (root only)


set an application to run inside a container


apply cgroups from file for container processes (root only)

-B, --bind=[]

a user-bind path specification.  spec has the format src[:dest[:opts]], where src and dest are outside and inside paths.  If dest is not given, it is set equal to src.  Mount options ('opts') may be specified as 'ro' (read-only) or 'rw' (read/write, which is the default). Multiple bind paths can be given by a comma separated list.

-e, --cleanenv[=false]

clean environment before running container

-c, --contain[=false]

use minimal /dev and empty other directories (e.g. /tmp and $HOME) instead of sharing filesystems from your host

-C, --containall[=false]

contain not only file systems, but also PID, IPC, and environment


list of DNS server separated by commas to add in resolv.conf


interactive prompt for docker authentication


a comma separated capability list to drop

-h, --help[=false]

help for test

-H, --home="/builddir"

a home directory specification.  spec can either be a src path or src:dest pair.  src is the source path of the home directory outside the container and dest overrides the home directory within the container.


set container hostname

-i, --ipc[=false]

run container in a new IPC namespace


let root user keep privileges in container (root only)

-n, --net[=false]

run container in a new network namespace (sets up a bridge network interface by default)


specify desired network type separated by commas, each network will bring up a dedicated interface inside container


specify network arguments to pass to CNI plugins


do NOT mount users home directory if home is not the current working directory


do NOT start shim process with --pid


drop all privileges from root user in container


do NOT use HTTPS, for communicating with local docker registry


enable experimental Nvidia support

-o, --overlay=[]

use an overlayFS image for persistent data storage or as read-only layer of container

-p, --pid[=false]

run container in a new PID namespace


initial working directory for payload process inside the container

-S, --scratch=[]

include a scratch directory within the container that is linked to a temporary dir (use -W to force location)


enable security features (SELinux, Apparmor, Seccomp)

-u, --userns[=false]

run container in a new user namespace, allowing Singularity to run completely unprivileged on recent kernels. This disables some features of Singularity, for example it only works with sandbox images.


run container in a new UTS namespace

-W, --workdir=""

working directory to be used for /tmp, /var/tmp and $HOME (if -c/--contain was also used)

-w, --writable[=false]

by default all Singularity containers are available as read only. This option makes the file system accessible as read/write.


makes the file system accessible as read-write with non persistent data (with overlay support only)


  Set the '%test' section with a definition file like so:
      echo "hello from test" "$@"

  $ singularity test /tmp/debian.sif command
      hello from test command

  For additional help, please visit our public documentation pages which are
  found at:

See Also



2-Apr-2019 Auto generated by spf13/cobra

Referenced By


Apr 2019 Auto generated by spf13/cobra