cc_staff
156
edits
Line 284: | Line 284: | ||
If all you need is to use a Docker image as-is with Apptainer, often those images can be built and run without issues, e.g., without any need to have additional permissions or explicitly use <code>--fakeroot</code>. Should you need to modify the image after creating it, such may require elevated permissions to successfully do this, e.g., if the image's Linux distribution's package manager requires such and you need to install a package using it. For this reason, the examples shown below assume one only needs to use a Docker image as-is. | If all you need is to use a Docker image as-is with Apptainer, often those images can be built and run without issues, e.g., without any need to have additional permissions or explicitly use <code>--fakeroot</code>. Should you need to modify the image after creating it, such may require elevated permissions to successfully do this, e.g., if the image's Linux distribution's package manager requires such and you need to install a package using it. For this reason, the examples shown below assume one only needs to use a Docker image as-is. | ||
==Building an SIF Image== | |||
'''NOTE:''' Please note and heed the advice concerning building images/overlays given '''[[#Building_Images.2FOverlays|earlier on this page]]'''. | |||
'''NOTE:''' Below only discusses creating a simple/basic compressed, read-only <code>SIF</code> file container image. See the [https://apptainer.org/docs Apptainer documentation] for more advanced aspects of building images. | |||
To build an Apptainer SIF file image, use the <code>apptainer build</code> command: | |||
<source lang="console">$ apptainer build bb.sif docker://busybox</source> | |||
==Building a Sandbox Image== | ==Building a Sandbox Image== | ||
Line 300: | Line 309: | ||
Within an account, using a "sandbox" directory will consume significant amounts of both disk space and file count quotas, thus, if read-write access to the underlying image is not normally required, you are advised to use an <code>SIF</code> instead. Additionally, using an <code>SIF</code> file will have higher disk access speeds to content contained within the <code>SIF</code> file. | Within an account, using a "sandbox" directory will consume significant amounts of both disk space and file count quotas, thus, if read-write access to the underlying image is not normally required, you are advised to use an <code>SIF</code> instead. Additionally, using an <code>SIF</code> file will have higher disk access speeds to content contained within the <code>SIF</code> file. | ||
=Example Use Cases= | =Example Use Cases= |