How to convert a Docker container to an Apptainer container

From RCSWiki
Jump to navigation Jump to search

General

Docker provides a convenient way of running software from within a preset environment with all the dependencies setup by the developers on any other Linux system. However, due to technical limitations Docker is not supported and not available on ARC.

Instead an alternative container technology based on Apptainer (former Singularity) can be used. Apptainer is another container technology with its own container format and specifications, but it also can use Docker containers as a source and convert them in its native Apptainer format.

Converting a GATK Docker image

GATK is a popular bioinformatics toolbox. To find a container for the latest version of we have to go to its home page at

https://www.broadinstitute.org/gatk/

Then we navigate to the download section following the Download latest version of GATK link.

https://github.com/broadinstitute/gatk/releases

There we find a link

Docker image: https://hub.docker.com/r/broadinstitute/gatk/

which leads us to the DockerHub site, that hosts publicly available images.

On that page we find out that the docker image is called broadinstitute/gatk. This is all information we need to convert it to an Apptainer image.

The build process will require some storage space and some amount of RAM. In some cases this may be an obstacle that will have to be solved.

  • So, we have to change the working directory to a location which we want to use for the image and that has enough space to hold the image and the temporary files.
$ cd my_images
  • Now we can check if apptainer is available:
$ apptainer --version
apptainer version 1.1.4-2.el8

Links

How-Tos