1apptainer(1) apptainer(1)
2
3
4
6 apptainer-instance-start - Start a named instance of the given con‐
7 tainer image
8
9
10
12 apptainer instance start [start options...] [startscript args...]
13
14
15
17 The instance start command allows you to create a new named instance
18 from an
19 existing container image that will begin running in the background.
20 If a
21 startscript is defined in the container metadata the commands in that
22 script
23 will be executed with the instance start command as well. You can op‐
24 tionally
25 pass arguments to startscript.
26
27
28 apptainer instance start accepts the following container formats
29
30
31 *.sif Singularity Image Format (SIF). Native to Singular‐
32 ity
33 (3.0+) and Apptainer (v1.0.0+)
34
35
36 *.sqsh SquashFS format. Native to Singularity 2.4+
37
38
39 *.img ext3 format. Native to Singularity versions < 2.4.
40
41
42 directory/ sandbox format. Directory containing a valid root
43 file
44 system and optionally Apptainer meta-data.
45
46
47 instance://* A local running instance of a container. (See the
48 instance
49 command group.)
50
51
52 library://* A SIF container hosted on a Library (no default)
53
54
55 docker://* A Docker/OCI container hosted on Docker Hub or an‐
56 other
57 OCI registry.
58
59
60 shub://* A container hosted on Singularity Hub.
61
62
63 oras://* A SIF container hosted on an OCI registry that sup‐
64 ports
65 the OCI Registry As Storage (ORAS) specification.
66
67
68
70 --add-caps="" a comma separated capability list to add
71
72
73 --allow-setuid[=false] allow setuid binaries in container (root
74 only)
75
76
77 --app="" set an application to run inside a container
78
79
80 --apply-cgroups="" apply cgroups from file for container processes
81 (root only)
82
83
84 -B, --bind=[] a user-bind path specification. spec has the format
85 src[:dest[:opts]], where src and dest are outside and inside paths. If
86 dest is not given, it is set equal to src. Mount options ('opts') may
87 be specified as 'ro' (read-only) or 'rw' (read/write, which is the de‐
88 fault). Multiple bind paths can be given by a comma separated list.
89
90
91 --blkio-weight=0 Block IO relative weight in range 10-1000, 0 to
92 disable
93
94
95 --blkio-weight-device=[] Device specific block IO relative weight
96
97
98 --boot[=false] execute /sbin/init to boot container (root only)
99
100
101 -e, --cleanenv[=false] clean environment before running container
102
103
104 --compat[=false] apply settings for increased OCI/Docker compati‐
105 bility. Infers --containall, --no-init, --no-umask, --no-eval,
106 --writable-tmpfs.
107
108
109 -c, --contain[=false] use minimal /dev and empty other directories
110 (e.g. /tmp and $HOME) instead of sharing filesystems from your host
111
112
113 -C, --containall[=false] contain not only file systems, but also
114 PID, IPC, and environment
115
116
117 --cpu-shares=-1 CPU shares for container
118
119
120 --cpus="" Number of CPUs available to container
121
122
123 --cpuset-cpus="" List of host CPUs available to container
124
125
126 --cpuset-mems="" List of host memory nodes available to container
127
128
129 --disable-cache[=false] do not use or create cache
130
131
132 --dmtcp-launch="" checkpoint for dmtcp to save container process
133 state to (experimental)
134
135
136 --dmtcp-restart="" checkpoint for dmtcp to use to restart con‐
137 tainer process (experimental)
138
139
140 --dns="" list of DNS server separated by commas to add in re‐
141 solv.conf
142
143
144 --docker-host="" specify a custom Docker daemon host
145
146
147 --docker-login[=false] login to a Docker Repository interactively
148
149
150 --drop-caps="" a comma separated capability list to drop
151
152
153 --env=[] pass environment variable to contained process
154
155
156 --env-file="" pass environment variables from file to contained
157 process
158
159
160 -f, --fakeroot[=false] run container with the appearance of run‐
161 ning as root
162
163
164 --fusemount=[] A FUSE filesystem mount specification of the form
165 ': ' - where is 'container' or 'host', specifying where the mount will
166 be performed ('container-daemon' or 'host-daemon' will run the FUSE
167 process detached). is the path to the FUSE executable, plus options
168 for the mount. is the location in the container to which the FUSE
169 mount will be attached. E.g. 'container:sshfs 10.0.0.1:/ /sshfs'. Im‐
170 plies --pid.
171
172
173 -h, --help[=false] help for start
174
175
176 -H, --home="/builddir" a home directory specification. spec can
177 either be a src path or src:dest pair. src is the source path of the
178 home directory outside the container and dest overrides the home direc‐
179 tory within the container.
180
181
182 --hostname="" set container hostname
183
184
185 -i, --ipc[=false] run container in a new IPC namespace
186
187
188 --keep-privs[=false] let root user keep privileges in container
189 (root only)
190
191
192 --memory="" Memory limit in bytes
193
194
195 --memory-reservation="" Memory soft limit in bytes
196
197
198 --memory-swap="" Swap limit, use -1 for unlimited swap
199
200
201 --mount=[] a mount specification e.g. 'type=bind,source=/opt,des‐
202 tination=/hostopt'.
203
204
205 -n, --net[=false] run container in a new network namespace (sets
206 up a bridge network interface by default)
207
208
209 --network="" specify desired network type separated by commas,
210 each network will bring up a dedicated interface inside container
211
212
213 --network-args=[] specify network arguments to pass to CNI plugins
214
215
216 --no-eval[=false] do not shell evaluate env vars or OCI container
217 CMD/ENTRYPOINT/ARGS
218
219
220 --no-home[=false] do NOT mount users home directory if /home is
221 not the current working directory
222
223
224 --no-https[=false] use http instead of https for docker:// oras://
225 and library:///... URIs
226
227
228 --no-init[=false] do NOT start shim process with --pid
229
230
231 --no-mount=[] disable one or more 'mount xxx' options set in app‐
232 tainer.conf and/or specify absolute destination path to disable a bind
233 path entry, or 'bind-paths' to disable all bind path entries.
234
235
236 --no-privs[=false] drop all privileges from root user in con‐
237 tainer)
238
239
240 --no-umask[=false] do not propagate umask to the container, set
241 default 0022 umask
242
243
244 --nv[=false] enable Nvidia support
245
246
247 --nvccli[=false] use nvidia-container-cli for GPU setup (experi‐
248 mental)
249
250
251 --oom-kill-disable[=false] Disable OOM killer
252
253
254 -o, --overlay=[] use an overlayFS image for persistent data stor‐
255 age or as read-only layer of container
256
257
258 --passphrase[=false] prompt for an encryption passphrase
259
260
261 --pem-path="" enter an path to a PEM formatted RSA key for an en‐
262 crypted container
263
264
265 --pid-file="" write instance PID to the file with the given name
266
267
268 --pids-limit=0 Limit number of container PIDs, use -1 for unlim‐
269 ited
270
271
272 --rocm[=false] enable experimental Rocm support
273
274
275 -S, --scratch=[] include a scratch directory within the container
276 that is linked to a temporary dir (use -W to force location)
277
278
279 --security=[] enable security features (SELinux, Apparmor, Sec‐
280 comp)
281
282
283 --underlay[=false] use underlay
284
285
286 --unsquash[=false] Convert SIF file to temporary sandbox before
287 running
288
289
290 -u, --userns[=false] run container in a new user namespace
291
292
293 --uts[=false] run container in a new UTS namespace
294
295
296 -W, --workdir="" working directory to be used for /tmp, /var/tmp
297 and $HOME (if -c/--contain was also used)
298
299
300 -w, --writable[=false] by default all Apptainer containers are
301 available as read only. This option makes the file system accessible as
302 read/write.
303
304
305 --writable-tmpfs[=false] makes the file system accessible as read-
306 write with non persistent data (with overlay support only)
307
308
309
311 $ apptainer instance start /tmp/my-sql.sif mysql
312
313 $ apptainer shell instance://mysql
314 Apptainer my-sql.sif> pwd
315 /home/mibauer/mysql
316 Apptainer my-sql.sif> ps
317 PID TTY TIME CMD
318 1 pts/0 00:00:00 appinit
319 2 pts/0 00:00:00 bash
320 3 pts/0 00:00:00 ps
321 Apptainer my-sql.sif>
322
323 $ apptainer instance stop /tmp/my-sql.sif mysql
324 Stopping /tmp/my-sql.sif mysql
325
326
327
328
330 apptainer-instance(1)
331
332
333
335 22-Nov-2023 Auto generated by spf13/cobra
336
337
338
339Auto generated by spf13/cobra Nov 2023 apptainer(1)