Archives & Docker DaemonAs well as being hosted in a registry, Docker / OCI containers might be found inside a running Docker daemon, or saved as an archive. Apptainer can build from these locations by using specialized bootstrap agents.
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE sylabsio/lolcow latest 5a15b484bc65 2 hours ago 188MB
$ apptainer build lolcow_from_docker_cache.sif docker-daemon:sylabsio/lolcow:latest INFO: Starting build... Getting image source signatures Copying blob sha256:a2022691bf950a72f9d2d84d557183cb9eee07c065a76485f1695784855c5193 119.83 MiB / 119.83 MiB [==================================================] 6s Copying blob sha256:ae620432889d2553535199dbdd8ba5a264ce85fcdcd5a430974d81fc27c02b45 15.50 KiB / 15.50 KiB [====================================================] 0s Copying blob sha256:c561538251751e3685c7c6e7479d488745455ad7f84e842019dcb452c7b6fecc 14.50 KiB / 14.50 KiB [====================================================] 0s Copying blob sha256:f96e6b25195f1b36ad02598b5d4381e41997c93ce6170cab1b81d9c68c514db0 5.50 KiB / 5.50 KiB [======================================================] 0s Copying blob sha256:7f7a065d245a6501a782bf674f4d7e9d0a62fa6bd212edbf1f17bad0d5cd0bfc 3.00 KiB / 3.00 KiB [======================================================] 0s Copying blob sha256:70ca7d49f8e9c44705431e3dade0636a2156300ae646ff4f09c904c138728839 116.56 MiB / 116.56 MiB [==================================================] 6s Copying config sha256:73d5b1025fbfa138f2cacf45bbf3f61f7de891559fa25b28ab365c7d9c3cbd82 3.33 KiB / 3.33 KiB [======================================================] 0s Writing manifest to image destination Storing signatures INFO: Creating SIF file... INFO: Build complete: lolcow_from_docker_cache.sif
BootStrap: docker From: alpine:latest %labels Maintainer Christian Dietrich Subread_Version 1.6.3 %apprun exactSNP exec exactSNP "${@}" %apprun featureCounts exec featureCounts "${@}" %apprun subindel exec subindel "${@}" %apprun subjunc exec subjunc "${@}" %apprun sublong exec sublong "${@}" %apprun subread-align exec subread-align "${@}" %apprun subread-buildindex exec subread-buildindex "${@}" %runscript exec echo "Available apps: exactSNP, featureCounts, subindel, subjunc, sublong, subread-align, subread-buildindex" %post # Get dependencies apk update apk add make gcc g++ zlib zlib-dev # Install Subread cd /tmp wget https://netcologne.dl.sourceforge.net/project/subread/subread-1.6.3/subread-1.6.3-source.tar.gz tar zxf subread-1.6.3-source.tar.gz cd subread-*/src make -j$(nproc) -f Makefile.Linux cp -r ../bin/* /usr/local/bin/ # Clean up apk del make gcc g++ zlib-dev rm -rf /var/cache/apk/* rm -rf /tmp/*