Reproducible Computational Environments Using Docker Containers

Netherlands eScience Center (in person, Amsterdam)

April 06 - 06, 2022

9:30 - 17:00 CEST

Instructors: Djura Smits, Johan Hidding

Helpers: Cunliang Geng, Francesco Nattino

Some adblockers block the registration window. If you do not see the registration box below, please check your adblocker settings.

General Information

The eScience Center offers a range of free workshops and training courses, open to all researchers affiliated with Dutch research organizations. We organize workshops covering digital skills needed to put reproducible research into practice. These include online collaboration, reproducible code and good programming practices. We also offer more advanced workshops such as GPU Programming, Parallel Programming and Deep Learning.

This workshop aims to introduce the use of Docker containers (and similar technology). Containers can help to make you work more reproducible. Your work becomes instantly accessible to potential users without going through pages of install instructions or days of compiling decade old Fortran programs. Your work can continue to be accessible in the coming years.

What are Software Containers?

Containers allow a researcher to package up a project with all of the parts it needs - such as libraries, dependencies, and system settings - and ship it all out as one package. Anyone can then open up a container and work within it, viewing and interacting with the project as if the machine they are accessing it from is identical to the machine specified in the container - regardless of what their computational environment actually is. They are designed to make it easier to transfer projects between very different environments.

Containers are a particularly useful way for reproducing research which relies on software to be configured in a certain way, or which makes use of libraries that vary between (or do not exist on) different systems. In summary, containers are a more robust way of sharing reproducible research.

Who: 

The participant should be familiar with working in a Unix or Windows shell environment. They are expected to know how to do the following using a command-line shell environment:

  • Navigating the filesystem
  • Manipulating files using a text editor
  • Running software

Where: Science Park 402, 1098 XH Amsterdam. Get directions with OpenStreetMap or Google Maps.

When: April 06 - 06, 2022, 9:30 - 17:00 CEST.

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Accessibility: We are committed to making this workshop accessible to everybody. The workshop organizers have checked that:

Materials will be provided in advance of the workshop and large-print handouts are available if needed by notifying the organizers in advance. If we can help making learning easier for you (e.g. sign-language interpreters, lactation facilities) please get in touch (using contact details below) and we will attempt to provide them.

Contact: Please email or training@esciencecenter.nl for more information.


Code of Conduct

Participants are expected to follow those guidelines:

Syllabus

Schedule

   
9:30 Welcome and Icebreaker
9:45 Introducing Containers
10:30 Break
10:40 Introducing the Docker Command Line
11:00 Exploring and Running Containers
11:30 Break
11:40 Cleaning up containers
12:05 Docker hub
12:30 Lunch Break
13:30 Creating Your Own Container Images
14:30 Break
14:40 Creating more complex container images
15:30 Break
15:40 Containers in Research Workflows: Reproducibility and Granularity
16:15 Wrap-up
16:30 Drinks!

Setup

To participate in this workshop, you will need access to software as described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

Software setup

Website accounts to create

Please seek help at the start of the lesson if you have not been able to establish a website account on:

Software to install

Docker’s installation experience has steadily improved, however situations will arise in which installing Docker on your computer may not be straightforward unless you have a large amount of technical experience. Workshops try to have helpers on hand that have worked their way through the install process, but do be prepared for some troubleshooting.

In most cases, you will need to have administrator rights on the computer in order to install the Docker software. If you are using a computer managed by your organisation and do not have administrator rights, you may be able to get your organisation’s IT staff to install Docker for you. Alternatively your IT support staff may be able to give you remote access to a server that can run Docker commands.

Please try to install the appropriate software from the list below depending on the operating system that your computer is running. Do let the workshop organisers know as early as possible if you are unable to install Docker using these instructions, as there may be other options available.

Microsoft Windows

You must have admin rights to run Docker! Some parts of the lesson will work without running as admin but if you are unable to Run as administrator on your machine some elements of this workshop might not work as described.

Ideally, you will be able to install the Docker Desktop software, following the Docker website’s documentation. Note that the instructions for installing Docker Desktop on Windows 10 Home Edition are different from other versions of Windows 10.

Note that the above installation instructions highlight a minimum version or “build” that is required to be able to install Docker on your Windows 10 system. See Which version of Windows operating system am I running? for details of how to find out which version/build of Windows 10 you have.

If you are unable to follow the above instructions to install Docker Desktop on your Windows system, the final release of the deprecated Docker Toolbox version of Docker for Windows can be downloaded from the releases page of the Docker Toolbox GitHub repository. (Download the .exe file for the Windows installer). Please note that this final release of Docker Toolbox includes an old version of Docker and you are strongly advised not to attempt to use this for any production use. It will, however, enable you to follow along with the lesson material.

Apple macOS

Ideally, you will be able to install the Docker Desktop software, following the Docker website’s documentation.

If you already use Homebrew or MacPorts to manage your software, and would prefer to use those tools rather than Docker’s installer, you can do so. For Homebrew, you can run the command brew install --cask docker. Note that you still need to run the Docker graphical user interface once to complete the initial setup, after which time the command line functionality of Docker will become available. We have not recently tested the installation process for the Docker port available through MacPorts, but it appears to be actively maintained.

If you have an older version of macOS, you could try installing the now deprecated Docker Toolbox, for the purpose of working through this material, from the releases page of the Docker Toolbox GitHub repository. (Download the .pkg file for the macOS installer). Please note that this final release of Docker Toolbox includes an old version of Docker and you are strongly advised not to attempt to use this for any production use. It will, however, enable you to follow along with the lesson material.

Linux

There are too many varieties of Linux to give precise instructions here, but hopefully you can locate documentation for getting Docker installed on your Linux distribution. It may already be installed. If it is not already installed on your system, the Install Docker Engine page provides an overview of supported Linux distributions and pointers to relevant installation information. Alternatively, see:

A quick tutorial on copy/pasting file contents from episodes of the lesson

Let’s say you want to copy text off the lesson website and paste it into a file named myfile in the current working directory of a shell window. This can be achieved in many ways, depending on your computer’s operating system, but routes I have found work for me: