An open source container platform, Apptainer (formerly Singularity) is designed for secure, high-performance computing (HPC) environments. Unlike Docker, which dominates desktops and cloud services, Apptainer shines in multi-user Linux systems such as HPC clusters, where user-space containers without root privileges are required. It provides similar functionality to Docker, including compatibility with most Docker images, while addressing security and portability needs in HPC.
This guide will help Docker-savvy developers explore Apptainer on Linux, covering installation, basic usage, and use cases.
Getting Started With Apptainer on Ubuntu
Installing Apptainer on Linux can be done via package managers or from source. Apptainer requires a modern Linux kernel (with user namespaces enabled for unprivileged use) and does not run on Windows/Mac without a Linux VM.
For many Debian/Ubuntu users, the easiest path is using the official Personal Package Archive (PPA):
| 123 | sudo apt update && sudo apt install -y software-properties-commonsudo add-apt-repository -y ppa:apptainer/ppasudo apt update && sudo apt install -y apptainer # use apptainer-suid for SUID mode |
These commands install Apptainer in unprivileged mode by default (no setuid binaries). If you need features requiring SUID (setuid root helpers for older kernels or certain mount functions), install the apptainer-suid package instead. In unprivileged mode, Apptainer leverages user namespaces so that you can run containers entirely as a regular user.
After installation, verify it works by executing a simple container, for example:
apptainer exec docker://alpine cat /etc/alpine-release
