Introduction to Docker and Podman

The aim of this module is to introduce Docker and Podman as software development tools and to explore their role in reproducible research.

Originally developed by Matthew Feickert for the 2019 USATLAS Computing Bootcamp at LBNL.

Prerequisites

Basic knowledge of the Unix Shell, e.g., from the carpentry course

Learning Objectives

After completing this module, participants will be able to:

  • Understand the concept of containers and their role in reproducible research.
  • Explain the purpose of containerization tools such as Docker and Podman.
  • Download (pull), run, and manage container images and container instances.
  • Understand how containers interact with the local file system.
  • Write and build basic container images using Dockerfiles.
  • Explain how containers can be shared to support reproducibility and collaboration.

HSF Software Training

HSF Logo
This training module is part of the HSF Software Training Center, a series of training modules that serves HEP newcomers the software skills needed as they enter the field, and in parallel, instill best practices for writing software.

Schedule

Setup Download files required for the lesson
00:00 1. Introduction What are containers?
What is Docker and Podman? What are the differences?
00:10 2. Pulling Images How are images downloaded?
How are images distinguished?
00:25 3. Running Containers How are containers run?
How do you monitor containers?
How are containers exited?
How are containers restarted?
00:45 4. File I/O with Containers How do containers interact with my local file system?
01:05 5. Coffee break Coffee or tea?
01:20 6. Writing Dockerfiles and Building Images How are Dockerfiles written?
How are images built?
02:10 7. Removal of Containers and Images How do you cleanup old containers?
How do you delete images?
02:20 8. Using CMD and ENTRYPOINT in Dockerfiles How are default commands set in Dockerfiles?
02:45 9. Bonus Episode: Building and deploying a Docker container to Github Packages How to build a Docker container for Python packages?
How to share Docker images?
03:25 Finish

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

Authors

The following people contributed to the content of this lesson: Note that this list does not include the contributors to the framework as developed by the carpentries.