LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

apptainer-overlay

Create and manage writable overlay filesystems for containers.

TLDR

Attach a writable layer inside an existing SIF, so the image can be changed
$ apptainer overlay create --size [500] [path/to/image.sif]
copy
Build a standalone overlay file that several images can share
$ apptainer overlay create --size [1024] [path/to/overlay.img]
copy
Allocate it sparsely, taking disk space only as it fills
$ apptainer overlay create --size [1024] --sparse [path/to/overlay.img]
copy
Lay it out for unprivileged fakeroot use
$ apptainer overlay create --fakeroot --size [1024] [path/to/overlay.img]
copy
Pre-create a directory inside the overlay
$ apptainer overlay create --create-dir [/data] --size [1024] [path/to/overlay.img]
copy
Run a container against an overlay file
$ apptainer run --overlay [path/to/overlay.img] [path/to/image.sif]
copy

SYNOPSIS

apptainer overlay create [options] image

DESCRIPTION

apptainer overlay manages EXT3 writable overlay filesystems for Apptainer containers. Overlays allow persistent writes on top of immutable SIF container images without modifying the original image.Overlays can be embedded directly into a SIF file or created as standalone image files that are attached at runtime. This enables persistent storage of modifications, logs, and user data while maintaining container immutability.

PARAMETERS

-s, --size size

Size of the EXT3 writable overlay in MiB (default: 64).
-S, --sparse
Create a sparse file instead of allocating full disk space.
-f, --fakeroot
Make the overlay layout usable by actions run with --fakeroot.
--create-dir path
Directory to create as part of the overlay layout (can be repeated).

INSTALL

sudo dnf install apptainer
copy
sudo pacman -S apptainer
copy
sudo apk add apptainer
copy
sudo zypper install apptainer
copy
brew install apptainer
copy
nix profile install nixpkgs#apptainer
copy

CAVEATS

Overlays require filesystem support for loop devices and EXT3. Sparse overlays save disk space but may cause performance issues with some workloads. Overlay size cannot be easily changed after creation.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid