Skip to content

Build containers

Building containers on the cluster

$ apptainer build <container_name.sif> <source for building>

You can create a container within a writable directory (called a sandbox) using the --sandbox option.

$ apptainer build --sandbox <directory_name>/ <source for building>

The resulting directory operates just like a container in a SIF file. To make persistent changes within the sandbox, use the --writable flag when you invoke your sandboxed container.

$ apptainer shell --writable <sandbox_directory_name>

You can also use the --writable option to shell into a sif container file.

$ apptainer shell --writable <container_name.sif>

Special cases

If you have a container that will not build without using the –-fakeroot option, please send e-mail to vacchelp@uvm.edu and tell us the circumstances.