RUN-SINGULARITY.APPTAINER(1)
π RUN-SINGULARITY.APPTAINER β the manual page for run, but cute π
okay so. you found the man page for run-singularity.apptainer (yes that's the manual name, it lives in section 1 of the User Commands manuals, we're being fancy today β¨). this is the glow-up version. all the facts stayed, the vibe is just, immaculate now. π«Ά
πΈ NAME πΈ
run-singularity.apptainer β launch a Singularity container with a runscript π
π¦ DESCRIPTION π¦
Run the user-defined default command within a container. that's it, that's the whole thing, and yet there are like sixty options. main character energy fr fr. π
β¨ Usage β¨
apptainer run [run options...] <container> [args...]
π« Description π«
okay so here's the tea π: this command launches an Apptainer container and executes a runscript if one is defined for that container. the runscript is a metadata file chilling inside the container, and it's full of shell commands. if that file is present (and executable, that part matters bestie) then this command will run that file inside the container automatically, no extra steps. everything you put after the container name gets passed straight through to the runscript. literally just handed over. π«΄
apptainer run says yes to all of these container formats:
*.sifβ Singularity Image Format (SIF). native to Singularity (3.0+) and Apptainer (v1.0.0+). the moment, the icon. β*.sqshβ SquashFS format. native to Singularity 2.4+*.imgβ ext3 format. native to Singularity versions < 2.4. vintage, honestly.directory/β sandbox format. a directory containing a valid root file system and optionally Apptainer meta-data. it's giving "just a folder but make it a whole OS". ποΈinstance://*β a local running instance of a container. (see the instance command group.)library://*β a SIF container hosted on a Library (no 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.
β OPTIONS β
here's the big one. buckle up, we're going through literally all of them. no skips, no cuts. π
--add-capsstring β a comma separated capability list to add--allow-setuidβ allow setuid binaries in container (root only) π--appstring β set an application to run inside a container--apply-cgroupsstring β apply cgroups from file for container processes (root only)--authfilestring β Docker-style authentication file to use for writing/reading OCI registry credentials-B,--bindstringArray β a user-bind path specification. 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 as 'ro' (read-only) or 'rw' (read/write, which is the default). multiple bind paths can be given by a comma separated list. π--blkio-weightint β Block IO relative weight in range 10-1000, 0 to disable--blkio-weight-devicestrings β Device specific block IO relative weight-e,--cleanenvβ clean environment before running container. fresh start, no inherited mess π§Ό--compatβ apply settings for increased OCI/Docker compatibility. infers--containall,--no-init,--no-umask,--no-eval,--writable-tmpfs.-c,--containβ use minimal/devand empty other directories (e.g./tmpand$HOME) instead of sharing filesystems from your host-C,--containallβ contain not only file systems, but also PID, IPC, and environment--cpu-sharesint β CPU shares for container (default -1)--cpusstring β Number of CPUs available to container--cpuset-cpusstring β List of host CPUs available to container--cpuset-memsstring β List of host memory nodes available to container--cwdstring β initial working directory for payload process inside the container (synonym for--pwd)--disable-cacheβ do not use or create cache--dnsstring β list of DNS server separated by commas to add in resolv.conf--docker-hoststring β specify a custom Docker daemon host--docker-loginβ login to a Docker Repository interactively--drop-capsstring β a comma separated capability list to drop--envstringToString β pass environment variable to contained process (default[])--env-filestrings β pass environment variables from file to contained process-f,--fakerootβ run container with the appearance of running as root π (the illusion! the fantasy!)--fusemountstrings β A FUSE filesystem mount specification of the form'<type>:<fuse command> <mountpoint>'β where<type>is 'container' or 'host', specifying where the mount will be performed ('container-daemon' or 'host-daemon' will run the FUSE process detached).<fuse command>is the path to the FUSE executable, plus options for the mount.<mountpoint>is 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β help for run π-H,--homestring β a home directory specification. spec can either be asrcpath orsrc:destpair.srcis the source path of the home directory outside the container anddestoverrides the home directory within the container. (default"/home/buildd") π--hostnamestring β set container hostname-i,--ipcβ run container in a new IPC namespace--keep-privsβ let root user keep privileges in container (root only)--memorystring β Memory limit in bytes--memory-reservationstring β Memory soft limit in bytes--memory-swapstring β Swap limit, use -1 for unlimited swap--mountstringArray β a mount specification e.g.'type=bind,source=/opt,destination=/hostopt'.-n,--netβ run container in a new network namespace (sets up a bridge network interface by default) πΈοΈ--netns-pathstring β join the network namespace at the specified path (as root, or if permitted in apptainer.conf)--networkstring β specify desired network type separated by commas, each network will bring up a dedicated interface inside container--network-argsstrings β specify network arguments to pass to CNI plugins--no-evalβ do not shell evaluate env vars or OCI containerCMD/ENTRYPOINT/ARGS--no-homeβ do NOT mount users home directory if/homeis not the current working directory--no-httpsβ usehttpinstead ofhttpsfordocker://oras://andlibrary://<hostname>/...URIs π--no-initβ do NOT start shim process with--pid--no-mountstrings β disable one or more 'mount xxx' options set in apptainer.conf and/or specify absolute destination path to disable a bind path entry, or 'bind-paths' to disable all bind path entries.--no-pidβ do not run container in a new PID namespace--no-privsβ drop all privileges from root user in container)--no-umaskβ do not propagate umask to the container, set default 0022 umask--nvβ enable Nvidia support--nvccliβ use nvidia-container-cli for GPU setup (experimental) π§ͺ--oom-kill-disableβ Disable OOM killer-o,--overlaystrings β use an overlayFS image for persistent data storage or as read-only layer of container--passphraseβ prompt for an encryption passphrase π--pem-pathstring β enter an path to a PEM formatted RSA key for an encrypted container-p,--pidβ run container in a new PID namespace--pids-limitint β Limit number of container PIDs, use -1 for unlimited--rocmβ enable experimental Rocm support--runscript-timeoutstring β set the timeout duration for runscript (default 1m) β° the runscript does NOT get forever, bestie-S,--scratchstrings β include a scratch directory within the container that is linked to a temporary dir (use-Wto force location)--securitystrings β enable security features (SELinux, Apparmor, Seccomp)--sharensβ share the namespace and image with other containers launched from the same parent process--unsquashβ Convert SIF file to temporary sandbox before running-u,--usernsβ run container in a new user namespace--utsβ run container in a new UTS namespace-W,--workdirstring β working directory to be used for/tmp,/var/tmpand$HOME(if-c/--containwas also used)-w,--writableβ by default all Apptainer containers are available as read only. this option makes the file system accessible as read/write. β οΈ with great power etc etc--writable-tmpfsβ makes the file system accessible as read-write with non persistent data (with overlay support only)
π EXAMPLES π
the goods. the receipts. π§Ύ
# Here we see that the runscript prints "Hello world: "
$ apptainer exec /tmp/debian.sif cat /apptainer
#!/bin/sh
echo "Hello world: "
# It runs with our inputs when we run the image
$ apptainer run /tmp/debian.sif one two three
Hello world: one two three
# Note that this does the same thing
$ ./tmp/debian.sif one two three
For additional help or support, please visit https://apptainer.org/help/ π«Ά
and that's the whole page bestie, we ate and left no crumbs π
β¨ this was run-singularity.apptainer version 1.4.... (yes, it really says that, dots and all π« ), dated August 2026, page RUN-SINGULARITY.APPTAINER(1). go run your containers, you're doing amazing. πππ¦
π¦ where this page comes from
- ubuntu stonking: apptainer 1.4.5-2ubuntu1 Β· BSD-3-Clause-LBNL AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms