community man page

apptainer-build

GNU

Build Apptainer container images.

8 examples·source: tldr · CC-BY·status: verified
Reading is open to everyone. Suggesting a flag, fixing an example or adding a recipe is opening to verified-email accounts soon — every change is moderated before it goes live.
curl https://curlhub.sh/man/apptainer-build
same page, in your terminal

Examples

Build a container from a definition file GNU

apptainer build path/to/image.sif path/to/definition.def

Build a container from Docker Hub GNU

apptainer build path/to/image.sif docker://image:tag

Build a container from the Container Library GNU

apptainer build path/to/image.sif library://user/collection/container:tag

Build a writable sandbox directory instead of an image file GNU

apptainer build [-s|--sandbox] path/to/directory docker://image:tag

Build a container without using the cache GNU

apptainer build --disable-cache path/to/image.sif docker://image:tag

Force overwrite an existing image file GNU

apptainer build [-F|--force] path/to/image.sif path/to/definition.def

Build using fakeroot for unprivileged builds GNU

apptainer build [-f|--fakeroot] path/to/image.sif path/to/definition.def

Display help GNU

apptainer build [-h|--help]