PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Sunday 9 a.m.–12:20 p.m.

Introduction to Docker and containers

Jérôme Petazzoni

Audience level:
Novice
Category:
Systems Administration

Description

Docker is an open platform to build, ship, and run any application, anywhere. It can be used in many ways: providing clean, isolated development environments; quickly spinning up test instances for CI purposes; ensuring coherence between development and production platform; and much more. In this hands-on tutorial, you will learn basic Docker concepts, and use it to run Python applications.

Abstract

The first public release of Docker happened in March 2013 at PyCon. Back then, it merely allowed to start containers with an easy-to-use command-line interface. By the end of 2013, it had gained a REST API, a build system (based on repeatable recipes called "Dockerfiles"), support for a wide range of Linux distros and storage systems, and more. Docker has become an incredibly useful tool; and while it has deep roots in the Python community, it is written in Go, and it can run any Linux app (with support coming soon for Oracle Solaris, Microsoft Windows, and more). A sign of the times: in December, the San Francisco Python group hosts a meet-up with a talk titled "Deploying Python Apps Without Docker." **So, what to expect from this tutorial?** This will take you "from zero to hero," explaining why Docker is so popular, giving examples of use, then jumping straight into a fast-paced hands-on course. You will learn how to run containers, how to build them, how to distribute container images. You will learn how to run services in containers: background workers or network services all alike. We will explain in depth the networking model used by Docker (including the new features that landed in Docker 1.9, like the `docker network` command and the `overlay` network driver). We will cover volumes, a major concept of Docker to store and share data (and essential to implement stateful services in containers). We will also brush on Compose, a tool allowing to put together complex applications made of multiple containers.

Student Handout