This lesson is being piloted (Beta version)

Reproducible Computational Environments Using Containers: Introduction to Docker

This session aims to introduce the use of Docker containers with the goal of using them to effect reproducible computational environments. Such environments are useful for ensuring reproducible research outputs, for example.


  • You should have basic familiarity with using a command shell, and the lesson text will at times request that you “open a shell window”, with an assumption that you know what this means.
    • Under Linux or macOS it is assumed that you will access a bash shell (usually the default), using your Terminal application.
    • Under Windows, Powershell and Git Bash should allow you to use the Unix instructions. We will also try to give command variants for Windows cmd.exe.
  • The lessons will sometimes request that you use a text editor to create or edit files in particular directories. It is assumed that you either have an editor that you know how to use that runs within the working directory of your shell window (e.g. nano), or that if you use a graphical editor, that you can use it to read and write files into the working directory of your shell.

If you are looking for a lesson on using singularity containers (instead of Docker), see this lesson:


Setup Download files required for the lesson
00:00 1. Introducing Containers What are containers, and why might they be useful to me?
00:20 2. Introducing the Docker command line How do I interact with Docker?
00:30 3. Exploring and Running Containers How do I interact with a Docker container on my computer?
01:00 4. Finding Containers on the Docker Hub What is the Docker Hub, and why is it useful?
01:20 5. Cleaning Up Containers How do I interact with a Docker container on my computer?
01:30 6. Creating your own container images How can I make my own Docker images?
02:05 7. Creating More Complex Container Images How can I make more complex container images?
03:05 8. Creating containers in the cloud How can I create Docker containers in the cloud?
03:25 9. Containers used in generating this lesson How can containers be useful to me for building websites?
03:45 10. Containers in research workflows: reproducibility and granularity How can I use container images to make my research more reproducible?
How do I incorporate containers into my research workflow?
What are container orchestration tools and how can they potentially help me?
04:05 Finish

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