apptainer(1)
β¨ NAME β¨
apptainer-instance-run β run a named instance of the given container image. Okay so welcome to apptainer(1), bestie: this page is all about giving your container a name and letting it do its thing in the background. Itβs giving main character energy, but make it background-process chic. π
π¦ SYNOPSIS π¦
apptainer instance run [start options...] [runscript args...]
π DESCRIPTION π
The instance run command lets you create a new named instance from an existing container image, and that instance starts running in the background. If a runscript is defined in the container metadata, the commands in that script get executed with the instance run command too. You can optionally pass arguments to the runscript. No cap. β¨
NOTE: This command was added to Apptainer significantly later than the other action commands and will not work with older containers. In that case, you may need to rebuild the container. π
apptainer instance run accepts the following container formats:
.sifβ Singularity Image Format (SIF) β Native to Singularity 3.0+ and all Apptainer versions..sqshβ SquashFS format β Native to Singularity 2.4+ and < 3.0..imgβ ext3 format β Native to Singularity versions < 2.4.directory/β sandbox format β a directory containing a valid root file system and optionally Apptainer meta-data.instance://β a local running instance of a container. See the instance command group.library://β a SIF container hosted on a Library (no library enabled by default).docker://β a Docker/OCI container hosted on Docker Hub or another OCI registry.shub://β a container hosted on Singularity Hub.oras://β a SIF container hosted on an OCI registry that supports the OCI Registry As Storage (ORAS) specification.ipfs://β a SIF image from an IPFS cluster, using a HTTP gateway.
π OPTIONS π
--add-caps=""β a comma-separated capability list to add. Like, sprinkle in extra powers.--allow-setuid[=false]β allow setuid binaries in the container (root only).--app=""β set an application to run inside a container.--apply-cgroups=""β apply cgroups from a file for container processes (root only).--authfile=""β Docker-style authentication file used for writing/reading OCI registry credentials.-B,--bind=[]β a user-bind path specification. The spec has the formatsrc[:dest[:opts]], wheresrcanddestare outside and inside paths. Ifdestis not given, it is set equal tosrc. Mount options (opts) may be specified asro(read-only) orrw(read/write, which is the default). Multiple bind paths can be given by a comma-separated list.--blkio-weight=0β Block IO relative weight in range10-1000;0disables it.--blkio-weight-device=[]β device-specific block IO relative weight.--boot[=false]β execute/sbin/initto boot the container (root only).-e,--cleanenv[=false]β clean environment before running the container.--compat[=false]β apply settings for increased OCI/Docker compatibility. Infers--containall,--no-init,--no-umask,--no-eval,--writable-tmpfs.-c,--contain[=false]β use minimal/devand empty other directories (e.g./tmpand$HOME) instead of sharing filesystems from your host.-C,--containall[=false]β contain not only file systems, but also PID, IPC, and environment.--cpu-shares=-1β CPU shares for the container.--cpus=""β number of CPUs available to the container.--cpuset-cpus=""β list of host CPUs available to the container.--cpuset-mems=""β list of host memory nodes available to the container.--disable-cache[=false]β do not use or create cache.--dmtcp-launch=""β checkpoint for dmtcp to save container process state to (experimental).--dmtcp-restart=""β checkpoint for dmtcp to use to restart the container process (experimental).--dns=""β list of DNS servers separated by commas to add inresolv.conf.--docker-host=""β specify a custom Docker daemon host.--docker-login[=false]β login to a Docker Repository interactively.--drop-caps=""β a comma-separated capability list to drop.--env=[]β pass an environment variable to the contained process.--env-file=[]β pass environment variables from a file to the contained process.-f,--fakeroot[=false]β run the container with the appearance of running as root.--fusemount=[]β a FUSE filesystem mount specification. The manpageβs placeholder fields got a little eaten, but the literal bits are: the form uses':';containerorhostsays where the mount will be performed (container-daemonorhost-daemonwill run the FUSE process detached); the path to the FUSE executable, plus options for the mount; and the location in the container to which the FUSE mount will be attached. E.g.'container:sshfs 10.0.0.1:/ /sshfs'. Implies--pid.-h,--help[=false]β help forrun.-H,--home="/builddir"β a home directory specification. The spec can either be asrcpath or asrc:destpair.srcis the source path of the home directory outside the container anddestoverrides the home directory within the container.--hostname=""β set the container hostname.--intel-hpu[=false]β enable Intel(R) Gaudi accelerator support while using a minimal/dev.-i,--ipc[=false]β run the container in a new IPC namespace.--keep-privs[=false]β let the root user keep privileges in the container (root only).--memory=""β memory limit in bytes.--memory-reservation=""β memory soft limit in bytes.--memory-swap=""β swap limit; use-1for unlimited swap.--mount=[]β a mount specification, e.g.'type=bind,src=/opt,dst=/hostopt'.-n,--net[=false]β run the container in a new network namespace (sets up a bridge network interface by default).--netns-path=""β join the network namespace at the specified path (as root, or if permitted inapptainer.conf).--network=""β specify desired network type separated by commas; each network will bring up a dedicated interface inside the container.--network-args=[]β specify network arguments to pass to CNI plugins.--no-env=[]β list of environment variables to block from import into the container from the host environment.--no-eval[=false]β do not shell evaluate env vars or OCI containerCMD/ENTRYPOINT/ARGS.--no-home[=false]β do NOT mount the userβs home directory if/homeis not the current working directory.--no-https[=false]β usehttpinstead ofhttpsfordocker://,oras://, andlibrary:///...URIs.--no-init[=false]β do NOT start shim process with--pid.--no-mount=[]β disable one or more'mount xxx'options set inapptainer.confand/or specify an absolute destination path to disable a bind path entry, or'bind-paths'to disable all bind path entries.--no-privs[=false]β drop all privileges from the root user in the container.--no-umask[=false]β do not propagate umask to the container; set default0022umask.--nv[=false]β enable Nvidia support.--nvccli[=false]β usenvidia-container-clifor GPU setup (experimental).--oom-kill-disable[=false]β disable OOM killer.-o,--overlay=[]β use an overlayFS image for persistent data storage or as a read-only layer of the container.--passphrase[=false]β prompt for an encryption passphrase.--pem-path=""β enter a path to a PEM formatted RSA key for an encrypted container.--pid-file=""β write the instance PID to the file with the given name.--pids-limit=0β limit the number of container PIDs; use-1for unlimited.--rocm[=false]β enable experimental Rocm support.--runscript-timeout=""β set the timeout duration for the runscript (default1m).-S,--scratch=[]β include a scratch directory within the container that is linked to a temporary dir (use-Wto force location).--security=[]β enable security features (SELinux,Apparmor,Seccomp).--unsquash[=false]β convert SIF file to temporary sandbox before running.-u,--userns[=false]β run the container in a new user namespace.--uts[=false]β run the container in a new UTS namespace.-W,--workdir=""β working directory to be used for/tmp,/var/tmp, and$HOME(if-c/--containwas also used).-w,--writable[=false]β by default all Apptainer containers are available as read only. This option makes the file system accessible as read/write.--writable-tmpfs[=false]β makes the file system accessible as read-write with non-persistent data (with overlay support only).
πΈ EXAMPLE πΈ
$ apptainer instance run /tmp/my-sql.sif mysql
$ apptainer shell instance://mysql
Apptainer my-sql.sif> pwd
/home/mibauer/mysql
Apptainer my-sql.sif> ps
PID TTY TIME CMD
1 pts/0 00:00:00 appinit
2 pts/0 00:00:00 bash
3 pts/0 00:00:00 ps
Apptainer my-sql.sif>
$ apptainer instance stop /tmp/my-sql.sif mysql
Stopping /tmp/my-sql.sif mysql
π«Ά SEE ALSO π«Ά
π HISTORY π
22-Oct-2026 β auto generated by spf13/cobra.
Okay thatβs the whole vibe. This page is apptainer(1), auto generated by spf13/cobra, and itβs dated Oct 2026. Byeee bestie, go run that instance πβ¨
π¦ where this page comes from
- epel 9: apptainer 1.5.5-1.el9 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-LBNL AND ISC AND MIT AND MPL-2.0 AND Unlicense
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms