|
apptainer pull <output.sif> shub://[reposiory/name/]
|
Pull sif image from Singularity Hub
|
|
apptainer pull <output.sif> docker://[docker_image]
|
Pull Docker image from Dockerhub or remote container registry
|
|
apptainer pull <output.sif> docker-daemon://[image_name]
|
Pull docker image from local Docker image builds
|
|
apptainer cache list
|
Show basic details on what is in the local cache
|
|
apptainer cache list -v
|
Lists SIF images stored in the local cache
|
|
apptainer cache clean
|
Remove everything stored in the local cache
|
$HOME/.apptainer/cache, but can be changed by modifying the APPTAINER_CACHEDIR variable
|
apptainer exec [SIF_File.sif] <command_to_execute>
|
Execute a command from the image
|
|
apptainer run [SIF_File.sif]
|
Executes the default command for the image
|
|
apptainer inspect -r [SIF_File.sif]
|
Inspect the SIF image and locate the default command
|
|
apptainer shell [SIF_File.sif]
|
Open an interactive shell within the container
|
|
apptainer shell -B /directory/to/add [SIF_File.sif]
|
Add a directory to the same location in the container
|
|
apptainer shell -B /directory/to/add:/new/location/in_container [SIF_File.sif]
|
Add a directory to a different location in the container
|
shell, exec, and run sub commands of Apptainer. shell is only used as an example. This is refered to as "Binding" the directory inside of the container.
|
apptainer build /path/to/ouput.sif /path/to/input.def
|
Build a sif image using the .def definition file.
|
|
Apptainer
|
Docker Equivalent
|
Description
|
|
From:
|
FROM
|
Base image for the image
|
|
%files
|
ADD
|
Add files from the host system into the image
|
|
%environment
|
ENV
|
Add environment variables to the image
|
|
%post
|
RUN
|
Run commands to build or install software in the image
|
|
%runscript
|
CMD / ENTRYPOINT
|
What to run when the container is used with
apptainer run |
|
%setup
|
Run commands on the host system before starting the build
|
|
|
%labels
|
LABEL
|
Add metadata labels
|
|
Bootstrap
|
Tells Apptainer which type of source the base image will be.
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.