Store, manage and share containers with others in your research projects

GitHub Container Registry is a service that allows you to store, manage and share containers. With this service you can easily share containers with others or use them in your own research projects. Utrecht University GitHub has its own GitHub Container Registry (GHCR) which can be used for the distribution of containers.

The service makes it convenient to manage containers and ensures you always have access to the latest versions of your containers when you need them. Here we will explain more about the service and what containers are. We also clarify some terms you need to understand before you start using GitHub Container Registry.

What are containers? 

Containers are standalone, portable environments that contain the entire computing environment used during processing or analysis of your data: software, software packages, their dependencies, libraries, binaries, and configuration files, all bundled into one package. Containers even contain their own operating system. Containers can be archived and shared, allowing an identical set-up to be used in the future, even as packages, functions, or libraries change over time. 

Within GitHub Container Registry (GHCR) your containers, and different versions of it, can be published, and will be easily accessible. That way you can make your research reproducible. 

Publishing Containers 

How to publish your containers? To know how you can do this, we first would like to explain the following terms.

Containerisation 

Containerisation is a process that bundles your software application with all the files and libraries it needs to run into one package that can be deployed on different platforms. An important advantage of containerising an application is portability (“write once, run anywhere”), and the fact that it removes the necessity of having to manually install all dependencies each time you install your software. Watch this video for more information on why the use of containers can be beneficial for researchers.

Docker 

Different containerisation techniques exist, one of the most common being Docker. For the definition of a container, Docker uses a Docker file. This is a text file containing all instructions required to build a Docker image. A Docker image is a read-only template that defines how a container will be realised when it is run. An actual running image is called a Docker container.

Publishing images 

Besides locally building a Docker image directly from the Docker file, it is also possible to publish a Docker image to a registry. Users can pull a pre-built image directly from the registry, eliminating the necessity of having to build it themselves. For complex container setups, build time for a new image can be long, which is negated when a pre-built image is pulled from the registry. Also, a registry is widely accessible, and has inbuilt versioning. Read more about container image versioning

Docker Hub is a well-known container registry, but have recently attempted to change their pricing model.

As part of its GitHub environment, Utrecht University has its own package registry that can be used to distribute Docker images (containers are a type of package). Within GitHub we explain how you can publish images to the UU’s GHCR. For long term archiving of Docker images we recommend using Zenodo.

Do you need help? 

The GHCR can be pretty technical. For that reason, the Research Engineering team is there to support you with containerization, help you out with the registry and other related questions. 

Contact us via email: research.engineering@uu.nl. We are there to help you.