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 format src[:dest[:opts]], where src and dest are outside and inside paths. If dest is not given, it is set equal to src. Mount options (opts) may be specified as ro (read-only) or rw (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 range 10-1000; 0 disables it.
  • --blkio-weight-device=[] β€” device-specific block IO relative weight.
  • --boot[=false] β€” execute /sbin/init to 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 /dev and empty other directories (e.g. /tmp and $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 in resolv.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 ':'; container or host says where the mount will be performed (container-daemon or host-daemon will 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 for run.
  • -H, --home="/builddir" β€” a home directory specification. The spec can either be a src path or a src:dest pair. src is the source path of the home directory outside the container and dest overrides 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 -1 for 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 in apptainer.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 container CMD/ENTRYPOINT/ARGS.
  • --no-home[=false] β€” do NOT mount the user’s home directory if /home is not the current working directory.
  • --no-https[=false] β€” use http instead of https for docker://, oras://, and library:///... URIs.
  • --no-init[=false] β€” do NOT start shim process with --pid.
  • --no-mount=[] β€” disable one or more 'mount xxx' options set in apptainer.conf and/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 default 0022 umask.
  • --nv[=false] β€” enable Nvidia support.
  • --nvccli[=false] β€” use nvidia-container-cli for 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 -1 for unlimited.
  • --rocm[=false] β€” enable experimental Rocm support.
  • --runscript-timeout="" β€” set the timeout duration for the runscript (default 1m).
  • -S, --scratch=[] β€” include a scratch directory within the container that is linked to a temporary dir (use -W to 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/--contain was 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 🫢

apptainer-instance(1)

πŸ‘‘ 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