1apptainer(1)                                                      apptainer(1)
2
3
4

NAME

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

SYNOPSIS

11       apptainer test [exec options...]
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             'apptainer start' command.
29
30
31

OPTIONS

33       --add-caps=""      a comma separated capability list to add
34
35
36       --allow-setuid[=false]      allow setuid binaries  in  container  (root
37       only)
38
39
40       --app=""      set an application to run inside a container
41
42
43       --apply-cgroups=""      apply cgroups from file for container processes
44       (root only)
45
46
47       -B, --bind=[]      a user-bind path specification.  spec has the format
48       src[:dest[:opts]], where src and dest are outside and inside paths.  If
49       dest is not given, it is set equal to src.  Mount options ('opts')  may
50       be  specified as 'ro' (read-only) or 'rw' (read/write, which is the de‐
51       fault). Multiple bind paths can be given by a comma separated list.
52
53
54       --blkio-weight=0      Block IO relative weight in range 10-1000,  0  to
55       disable
56
57
58       --blkio-weight-device=[]      Device specific block IO relative weight
59
60
61       -e, --cleanenv[=false]      clean environment before running container
62
63
64       --compat[=false]       apply settings for increased OCI/Docker compati‐
65       bility.  Infers   --containall,   --no-init,   --no-umask,   --no-eval,
66       --writable-tmpfs.
67
68
69       -c, --contain[=false]      use minimal /dev and empty other directories
70       (e.g. /tmp and $HOME) instead of sharing filesystems from your host
71
72
73       -C, --containall[=false]      contain not only file systems,  but  also
74       PID, IPC, and environment
75
76
77       --cpu-shares=-1      CPU shares for container
78
79
80       --cpus=""      Number of CPUs available to container
81
82
83       --cpuset-cpus=""      List of host CPUs available to container
84
85
86       --cpuset-mems=""      List of host memory nodes available to container
87
88
89       --disable-cache[=false]      do not use or create cache
90
91
92       --dns=""       list  of  DNS  server  separated by commas to add in re‐
93       solv.conf
94
95
96       --docker-login[=false]      login to a Docker Repository interactively
97
98
99       --drop-caps=""      a comma separated capability list to drop
100
101
102       --env=[]      pass environment variable to contained process
103
104
105       --env-file=""      pass environment variables from  file  to  contained
106       process
107
108
109       -f,  --fakeroot[=false]       run container with the appearance of run‐
110       ning as root
111
112
113       --fusemount=[]      A FUSE filesystem mount specification of  the  form
114       ': ' - where  is 'container' or 'host', specifying where the mount will
115       be performed ('container-daemon' or 'host-daemon'  will  run  the  FUSE
116       process  detached).   is  the path to the FUSE executable, plus options
117       for the mount.  is the location in the  container  to  which  the  FUSE
118       mount  will  be attached. E.g. 'container:sshfs 10.0.0.1:/ /sshfs'. Im‐
119       plies --pid.
120
121
122       -h, --help[=false]      help for test
123
124
125       -H, --home="/builddir"      a home directory specification.   spec  can
126       either  be  a src path or src:dest pair.  src is the source path of the
127       home directory outside the container and dest overrides the home direc‐
128       tory within the container.
129
130
131       --hostname=""      set container hostname
132
133
134       -i, --ipc[=false]      run container in a new IPC namespace
135
136
137       --keep-privs[=false]       let  root  user keep privileges in container
138       (root only)
139
140
141       --memory=""      Memory limit in bytes
142
143
144       --memory-reservation=""      Memory soft limit in bytes
145
146
147       --memory-swap=""      Swap limit, use -1 for unlimited swap
148
149
150       --mount=[]      a mount specification e.g.  'type=bind,source=/opt,des‐
151       tination=/hostopt'.
152
153
154       -n,  --net[=false]       run container in a new network namespace (sets
155       up a bridge network interface by default)
156
157
158       --network=""      specify desired network  type  separated  by  commas,
159       each network will bring up a dedicated interface inside container
160
161
162       --network-args=[]      specify network arguments to pass to CNI plugins
163
164
165       --no-eval[=false]       do not shell evaluate env vars or OCI container
166       CMD/ENTRYPOINT/ARGS
167
168
169       --no-home[=false]      do NOT mount users home directory  if  /home  is
170       not the current working directory
171
172
173       --no-https[=false]      use http instead of https for docker:// oras://
174       and library:///... URIs
175
176
177       --no-init[=false]      do NOT start shim process with --pid
178
179
180       --no-mount=[]      disable one or more 'mount xxx' options set in  app‐
181       tainer.conf and/or specify absolute destination path to disable a 'bind
182       path' entry
183
184
185       --no-privs[=false]      drop all privileges  from  root  user  in  con‐
186       tainer)
187
188
189       --no-umask[=false]       do  not  propagate umask to the container, set
190       default 0022 umask
191
192
193       --nv[=false]      enable Nvidia support
194
195
196       --nvccli[=false]      use nvidia-container-cli for GPU  setup  (experi‐
197       mental)
198
199
200       --oom-kill-disable[=false]      Disable OOM killer
201
202
203       -o,  --overlay=[]      use an overlayFS image for persistent data stor‐
204       age or as read-only layer of container
205
206
207       --passphrase[=false]      prompt for an encryption passphrase
208
209
210       --pem-path=""      enter an path to a PEM formatted RSA key for an  en‐
211       crypted container
212
213
214       -p, --pid[=false]      run container in a new PID namespace
215
216
217       --pids-limit=0       Limit  number of container PIDs, use -1 for unlim‐
218       ited
219
220
221       --pwd=""      initial working directory for payload process inside  the
222       container
223
224
225       --rocm[=false]      enable experimental Rocm support
226
227
228       -S,  --scratch=[]      include a scratch directory within the container
229       that is linked to a temporary dir (use -W to force location)
230
231
232       --security=[]      enable security features  (SELinux,  Apparmor,  Sec‐
233       comp)
234
235
236       --unsquash[=false]       Convert  SIF  file to temporary sandbox before
237       running
238
239
240       -u, --userns[=false]      run container in a new user namespace
241
242
243       --uts[=false]      run container in a new UTS namespace
244
245
246       --vm[=false]      enable VM support
247
248
249       --vm-cpu="1"      number of CPU cores to allocate  to  Virtual  Machine
250       (implies --vm)
251
252
253       --vm-err[=false]      enable attaching stderr from VM
254
255
256       --vm-ip="dhcp"       IP Address to assign for container usage. Defaults
257       to DHCP within bridge network.
258
259
260       --vm-ram="1024"      amount of RAM in MiB to allocate  to  Virtual  Ma‐
261       chine (implies --vm)
262
263
264       -W,  --workdir=""       working directory to be used for /tmp, /var/tmp
265       and $HOME (if -c/--contain was also used)
266
267
268       -w, --writable[=false]      by default  all  Apptainer  containers  are
269       available as read only. This option makes the file system accessible as
270       read/write.
271
272
273       --writable-tmpfs[=false]      makes the file system accessible as read-
274       write with non persistent data (with overlay support only)
275
276
277

EXAMPLE

279                Set the '%test' section with a definition file like so:
280                %test
281                    echo "hello from test" "$@"
282
283                $ apptainer test /tmp/debian.sif command
284                    hello from test command
285
286                For additional help, please visit our public documentation pages which are
287                found at:
288
289                    https://apptainer.org/docs/
290
291
292
293

SEE ALSO

295       apptainer(1)
296
297
298

HISTORY

300       10-Jan-2023 Auto generated by spf13/cobra
301
302
303
304Auto generated by spf13/cobra      Jan 2023                       apptainer(1)
Impressum