This lesson is in the early stages of development (Alpha version)

Using Containers in Science (Docker and Singularity)

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A container image is a lightweight, standalone and executable package of software that includes everything to run an application. Two popular container solutions are Docker and Singularity.

In this session you will learn how to use containers on your local system or on an HPC system. At the end of the course you will also be able to package your own application into your custom container. By uploading the container image to a registry, you learn how to share your work with others and simplify the distribution and increase the portability of your software.


In this course we use Docker and Singularity from the Unix Shell. Some previous experience with the shell is expected.


Setup Download files required for the lesson
00:00 1. Introduction What are containers, what is the difference to a VM and why should I use them?
00:15 2. Pulling and Running Docker Containers What is Docker?
How do I fetch and run Docker images?
How can I use folders from my local filesystem inside a Docker container?
00:50 3. Creating a Docker container What is the difference between a Docker image and a container?
How to create my own Docker image?
What are the most important components of a Dockerfile?
01:20 4. Publishing Docker Images to a Container Registry How to publish Docker images on the GitLab Container Registry?
How to assign version tags to your Docker images?
How to delete images or tags?
01:35 5. Using Docker Compose What is Docker Compose?
How can I use file-based container settings?
How do I run multiple containers at once?
01:33 6. Using Tools to Manage Docker Containers What tools can help me handle containers?
01:31 7. Using Containers in HPC with Singularity What is the difference between Docker and Singularity?
Why is Singularity more suitable for HPC?
02:01 8. Pitfalls and Best Practices
02:21 9. Package your own application into a container
03:51 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.