1apptainer(1) apptainer(1)
2
3
4
6 apptainer-test - Run the user-defined tests within a container
7
8
9
11 apptainer test [exec options...]
12
13
14
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
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-host="" specify a custom Docker daemon host
97
98
99 --docker-login[=false] login to a Docker Repository interactively
100
101
102 --drop-caps="" a comma separated capability list to drop
103
104
105 --env=[] pass environment variable to contained process
106
107
108 --env-file="" pass environment variables from file to contained
109 process
110
111
112 -f, --fakeroot[=false] run container with the appearance of run‐
113 ning as root
114
115
116 --fusemount=[] A FUSE filesystem mount specification of the form
117 ': ' - where is 'container' or 'host', specifying where the mount will
118 be performed ('container-daemon' or 'host-daemon' will run the FUSE
119 process detached). is the path to the FUSE executable, plus options
120 for the mount. is the location in the container to which the FUSE
121 mount will be attached. E.g. 'container:sshfs 10.0.0.1:/ /sshfs'. Im‐
122 plies --pid.
123
124
125 -h, --help[=false] help for test
126
127
128 -H, --home="/builddir" a home directory specification. spec can
129 either be a src path or src:dest pair. src is the source path of the
130 home directory outside the container and dest overrides the home direc‐
131 tory within the container.
132
133
134 --hostname="" set container hostname
135
136
137 -i, --ipc[=false] run container in a new IPC namespace
138
139
140 --keep-privs[=false] let root user keep privileges in container
141 (root only)
142
143
144 --memory="" Memory limit in bytes
145
146
147 --memory-reservation="" Memory soft limit in bytes
148
149
150 --memory-swap="" Swap limit, use -1 for unlimited swap
151
152
153 --mount=[] a mount specification e.g. 'type=bind,source=/opt,des‐
154 tination=/hostopt'.
155
156
157 -n, --net[=false] run container in a new network namespace (sets
158 up a bridge network interface by default)
159
160
161 --network="" specify desired network type separated by commas,
162 each network will bring up a dedicated interface inside container
163
164
165 --network-args=[] specify network arguments to pass to CNI plugins
166
167
168 --no-eval[=false] do not shell evaluate env vars or OCI container
169 CMD/ENTRYPOINT/ARGS
170
171
172 --no-home[=false] do NOT mount users home directory if /home is
173 not the current working directory
174
175
176 --no-https[=false] use http instead of https for docker:// oras://
177 and library:///... URIs
178
179
180 --no-init[=false] do NOT start shim process with --pid
181
182
183 --no-mount=[] disable one or more 'mount xxx' options set in app‐
184 tainer.conf and/or specify absolute destination path to disable a bind
185 path entry, or 'bind-paths' to disable all bind path entries.
186
187
188 --no-privs[=false] drop all privileges from root user in con‐
189 tainer)
190
191
192 --no-umask[=false] do not propagate umask to the container, set
193 default 0022 umask
194
195
196 --nv[=false] enable Nvidia support
197
198
199 --nvccli[=false] use nvidia-container-cli for GPU setup (experi‐
200 mental)
201
202
203 --oom-kill-disable[=false] Disable OOM killer
204
205
206 -o, --overlay=[] use an overlayFS image for persistent data stor‐
207 age or as read-only layer of container
208
209
210 --passphrase[=false] prompt for an encryption passphrase
211
212
213 --pem-path="" enter an path to a PEM formatted RSA key for an en‐
214 crypted container
215
216
217 -p, --pid[=false] run container in a new PID namespace
218
219
220 --pids-limit=0 Limit number of container PIDs, use -1 for unlim‐
221 ited
222
223
224 --pwd="" initial working directory for payload process inside the
225 container
226
227
228 --rocm[=false] enable experimental Rocm support
229
230
231 -S, --scratch=[] include a scratch directory within the container
232 that is linked to a temporary dir (use -W to force location)
233
234
235 --security=[] enable security features (SELinux, Apparmor, Sec‐
236 comp)
237
238
239 --underlay[=false] use underlay
240
241
242 --unsquash[=false] Convert SIF file to temporary sandbox before
243 running
244
245
246 -u, --userns[=false] run container in a new user namespace
247
248
249 --uts[=false] run container in a new UTS namespace
250
251
252 --vm[=false] enable VM support
253
254
255 --vm-cpu="1" number of CPU cores to allocate to Virtual Machine
256 (implies --vm)
257
258
259 --vm-err[=false] enable attaching stderr from VM
260
261
262 --vm-ip="dhcp" IP Address to assign for container usage. Defaults
263 to DHCP within bridge network.
264
265
266 --vm-ram="1024" amount of RAM in MiB to allocate to Virtual Ma‐
267 chine (implies --vm)
268
269
270 -W, --workdir="" working directory to be used for /tmp, /var/tmp
271 and $HOME (if -c/--contain was also used)
272
273
274 -w, --writable[=false] by default all Apptainer containers are
275 available as read only. This option makes the file system accessible as
276 read/write.
277
278
279 --writable-tmpfs[=false] makes the file system accessible as read-
280 write with non persistent data (with overlay support only)
281
282
283
285 Set the '%test' section with a definition file like so:
286 %test
287 echo "hello from test" "$@"
288
289 $ apptainer test /tmp/debian.sif command
290 hello from test command
291
292 For additional help, please visit our public documentation pages which are
293 found at:
294
295 https://apptainer.org/docs/
296
297
298
299
301 apptainer(1)
302
303
304
306 22-Nov-2023 Auto generated by spf13/cobra
307
308
309
310Auto generated by spf13/cobra Nov 2023 apptainer(1)