1singularity(1)                                                  singularity(1)
2
3
4

NAME

6       singularity-test - Run the user-defined tests within a container
7
8
9

SYNOPSIS

11       singularity test [exec options...] <image path>
12
13
14

DESCRIPTION

16       The 'test' command allows you to execute a testscript (if available)
17       inside of
18         a given container
19
20
21       NOTE:
22             For instances if there is a daemon process running inside the
23       container,
24             then subsequent container commands will all run within the same
25             namespaces. This means that the --writable and --contain options
26       will not
27             be honored as the namespaces have already been configured by the
28             'singularity start' command.
29
30
31

OPTIONS

33       --add-caps=""
34           a comma separated capability list to add
35
36
37       --allow-setuid[=false]
38           allow setuid binaries in container (root only)
39
40
41       --app=""
42           set an application to run inside a container
43
44
45       --apply-cgroups=""
46           apply cgroups from file for container processes (root only)
47
48
49       -B, --bind=[]
50           a user-bind path specification.  spec has the format
51       src[:dest[:opts]], where src and dest are outside and inside paths.  If
52       dest is not given, it is set equal to src.  Mount options ('opts') may
53       be specified as 'ro' (read-only) or 'rw' (read/write, which is the
54       default). Multiple bind paths can be given by a comma separated list.
55
56
57       -e, --cleanenv[=false]
58           clean environment before running container
59
60
61       -c, --contain[=false]
62           use minimal /dev and empty other directories (e.g. /tmp and $HOME)
63       instead of sharing filesystems from your host
64
65
66       -C, --containall[=false]
67           contain not only file systems, but also PID, IPC, and environment
68
69
70       --disable-cache[=false]
71           dont use cache, and dont create cache
72
73
74       --dns=""
75           list of DNS server separated by commas to add in resolv.conf
76
77
78       --docker-login[=false]
79           login to a Docker Repository interactively
80
81
82       --drop-caps=""
83           a comma separated capability list to drop
84
85
86       -f, --fakeroot[=false]
87           run container in new user namespace as uid 0
88
89
90       -h, --help[=false]
91           help for test
92
93
94       -H, --home="/builddir"
95           a home directory specification.  spec can either be a src path or
96       src:dest pair.  src is the source path of the home directory outside
97       the container and dest overrides the home directory within the
98       container.
99
100
101       --hostname=""
102           set container hostname
103
104
105       -i, --ipc[=false]
106           run container in a new IPC namespace
107
108
109       --keep-privs[=false]
110           let root user keep privileges in container (root only)
111
112
113       -n, --net[=false]
114           run container in a new network namespace (sets up a bridge network
115       interface by default)
116
117
118       --network="bridge"
119           specify desired network type separated by commas, each network will
120       bring up a dedicated interface inside container
121
122
123       --network-args=[]
124           specify network arguments to pass to CNI plugins
125
126
127       --no-home[=false]
128           do NOT mount users home directory if home is not the current
129       working directory
130
131
132       --no-init[=false]
133           do NOT start shim process with --pid
134
135
136       --no-nv[=false]
137
138
139       --no-privs[=false]
140           drop all privileges from root user in container)
141
142
143       --nohttps[=false]
144           do NOT use HTTPS with the docker:// transport (useful for local
145       docker registries without a certificate)
146
147
148       --nonet[=false]
149           disable VM network handling
150
151
152       --nv[=false]
153           enable experimental Nvidia support
154
155
156       -o, --overlay=[]
157           use an overlayFS image for persistent data storage or as read-only
158       layer of container
159
160
161       --passphrase[=false]
162           prompt for an encryption passphrase
163
164
165       --pem-path=""
166           enter an path to a PEM formated RSA key for an encrypted container
167
168
169       -p, --pid[=false]
170           run container in a new PID namespace
171
172
173       --pwd=""
174           initial working directory for payload process inside the container
175
176
177       --rocm[=false]
178           enable experimental Rocm support
179
180
181       -S, --scratch=[]
182           include a scratch directory within the container that is linked to
183       a temporary dir (use -W to force location)
184
185
186       --security=[]
187           enable security features (SELinux, Apparmor, Seccomp)
188
189
190       -u, --userns[=false]
191           run container in a new user namespace, allowing Singularity to run
192       completely unprivileged on recent kernels. This disables some features
193       of Singularity, for example it only works with sandbox images.
194
195
196       --uts[=false]
197           run container in a new UTS namespace
198
199
200       --vm[=false]
201           enable VM support
202
203
204       --vm-cpu="1"
205           number of CPU cores to allocate to Virtual Machine (implies --vm)
206
207
208       --vm-err[=false]
209           enable attaching stderr from VM
210
211
212       --vm-ip="dhcp"
213           IP Address to assign for container usage. Defaults to DHCP within
214       bridge network.
215
216
217       --vm-ram="1024"
218           amount of RAM in MiB to allocate to Virtual Machine (implies --vm)
219
220
221       -W, --workdir=""
222           working directory to be used for /tmp, /var/tmp and $HOME (if
223       -c/--contain was also used)
224
225
226       -w, --writable[=false]
227           by default all Singularity containers are available as read only.
228       This option makes the file system accessible as read/write.
229
230
231       --writable-tmpfs[=false]
232           makes the file system accessible as read-write with non persistent
233       data (with overlay support only)
234
235
236

EXAMPLE

238                Set the '%test' section with a definition file like so:
239                %test
240                    echo "hello from test" "$@"
241
242                $ singularity test /tmp/debian.sif command
243                    hello from test command
244
245                For additional help, please visit our public documentation pages which are
246                found at:
247
248                    https://www.sylabs.io/docs/
249
250
251
252

SEE ALSO

254       singularity(1)
255
256
257

HISTORY

259       18-Feb-2020 Auto generated by spf13/cobra
260
261
262
263Auto generated by spf13/cobra      Feb 2020                     singularity(1)
Impressum