Docker 101

Meet the portable future

Presented at PyOhio on 7/26/14

About me

Andrew T. Baker
Python consultant in Washington, DC
Django-district co-organizer
Spin-docker side project


This presentation:
Tutorial repo:

About you


  • Short presentation covering docker basics
  • Self-paced tutorials
  • Informal, collaborative feel
  • Ask questions anytime!

What is docker?


Virtualization tool?

Configuration manager?
VM manager?
Fancy cgroups?

Docker is something new says:

Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere. 

App portability

management tools
Traditional VMs
Environment agnostic
Environment specific



Typical docker architecture

Rule of thumb: One container for each process

Why is this a big deal?

It takes us one big step closer to
commoditization of computing services

Docker basics


Applications run in containers. 

To create a container, you need a docker image and a command to execute:
$ docker run busybox /bin/echo foobar >> /tmp/foo.txthello world


Saved states of containers. 

To create an image, you commit changes you made in a container:
$ docker commit -m "Add foo.txt" e25605a6d745 atbaker/foobar

Dockerfiles (builder)

Scripts with a series of commands to build docker images:
# Spin-docker example dockerfile for a Django project

# Use phusion/baseimage as base image
FROM phusion/baseimage:0.9.8

MAINTAINER Andrew T. Baker <># Add the Django app and install its requirements
ADD sd_sample_project /var/www/django
RUN apt-get install -y python-pip
RUN pip install virtualenv
RUN virtualenv /var/www/venv
RUN /.../venv/bin/pip install -r /.../requirements.txt...

Docker hub

Git for deployment?

Docker Git Description
image repository collection of commits
container clone used for local execution
docker hub GitHub popular remote server

An open-source
success story

  • dotCloud side project revealed at PyCon 2013 
  • Since then:
    • Downloaded 1,000,000+ times
    • Powers 300+ projects
    • 350+ docker contributors
    • 10,000+ GitHub stars
  • dotCloud changes its name to Docker

  • 1.0 released in June 2014!

    What are people
    doing with docker?

    Development environments

    Platform-as-a-Service (Paas)

    Continuous Integration (CI)

    Educational sandboxes

    And the tools are
    getting better too


    Cloud hosting

    (additional free credit for you today!)

    Getting better all the time

    Just these past couple months!
  • Docker officially included in Ubuntu 14.04 LTS
  • Docker support in AWS Elastic Beanstalk
  • Manage your Docker containers with Vagrant
  • Inaugural DockerCon in June

  • The Docker Weekly email newsletter is a great way to stay in touch.


    If not, it's tutorial time!

    Intro tutorial

    For people new to docker. Covers:
    • Docker basics
    • Dockerizing your own apps
    • Managing your development environments with Fig

    Advanced tutorial

    If you finish the intro material - a survey of different docker projects, plus an exercise to get you working with the docker API.
    • Learn how to use Drone, Deis, and Tutum
    • Play with the docker API
    • Or, just talk with other folks about Docker

    Tutorial repo

    Cloud server signup

    There's only one of me! Please help your neighbors if you can.



    Free tutum credit: 

    My contact info: