Container images are normally a single read-only file. This means that any modifications you make when running the container will not be saved to the container image when the container stops. Every time you start a container, the container will be in the same state as the original image. This is exactly what you want for reproducibility.

However, sometimes you do want your changes to persist in containers, like output files you generated and want to reuse later. An Apptainer overlay gives you a writable layer that sits on top of the read-only image, so anything you generate can be saved to the overlay, and you may attach this overlay to containers when they're started. It is similar to attaching a USB to a computer and saving the data to that USB.

Note that the following feature is not available on TACC systems.

To make an overlay, use apptainer overlay create and give it a size in MiB:

Then start the container with the --overlay option, and your changes are written to the overlay file:

You may also add the option :ro to make the overlay read-only:

 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Access Statement
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)