Containerization Tutorial

Containerization Tutorial [🔗]

What are we doing here? [🔗]

Tutorial Goals [🔗]

In this tutorial series we are going to learn how to:

Prerequisites [🔗]

This tutorial is written assuming you are running commands in a Linux environment, which it assumes that you created and configured according to the instructions in this guide. If you don’t have access to an Azure cloud account, most of this tutorial can be completed on your own personal computer. See the appendix for notes on that.

It also assumes you have Microsoft Visual Studio Code installed on your computer.

The tutorial content makes light use of shell scripting and Python. It does not expect you to write any such scripts on your own, but it will help to have a passing familiarity with them.

Part 3 of the tutorial involves deployment of containers to the web, for which you’ll need a free Docker hub account. You can register for one here.

Background [🔗]

Containers [🔗]

Containers are a technology that let you easily reproduce the environment your code runs in on other computers and servers. This environment includes all the software, libraries, and hand-tweaked configuration you need to run your experiments and reproduce their results.

You could think of containers as very light-weight virtual machines: they run faster and take up less disk space than traditional VMs, while still giving the appearance of an isolated computer to the applications running within.

That said, they are more often used to run code than as an interactive desktop computer – you won’t usually open a terminal within a container or run graphical applications from them. Rather, once you develop your code, you will package it into a container image which can be run reproducibly.

Docker [🔗]

Docker containers are one implementation of the container concept, which we will be working with for the remainder of this tutorial. Docker container images can be published for free on Docker Hub, which hosts Docker images the same way Github hosts code and Google Docs hosts word documents.

The most common way of interacting with Docker on your computer is with the Docker Command Line Interface (Docker CLI), but there is also a wonderful VS Code Docker plugin that lets us do many of the same operations through VS Code’s GUI. We will be using that as well.

Tutorial Modules [🔗]

Part 1: Running Containers [🔗]

Part 2: Building Containers [🔗]

Part 3: Deploying Containers [🔗]

Appendix: Using Docker on your personal computer [🔗]

Notes and References [🔗]

TODOs [🔗]