DOCKER




STL Lambda Lounge
December 2013

Steven Borrelli
steve@borrelli.org
@stevendborrelli {twitter/github}

THE HYPE


DOCKER HISTORY


A dotCloud (PAAS provider) project


Initial commit January 18, 2013


Docker 0.1.0 released March 25, 2013


7,800+ github stars, 1,000+ forks


dotCloud pivots to docker inc. October 29, 2013


WHAT IS DOCKER?




Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.

LIGHTWEIGHT


Based on Linux containers

Minimal overhead (cpu/io/network)

Uses layered filesystem to save space (AUFS/LVM)

Uses a copy-on-write filesystem to track changes

Portable


Can run on any Linux system that supports LXC (today). 

0.7 release includes support for RedHat/Fedora family.

Raspberry pi support.

Future plans to support other container tools (lmctfy, etc.)

Possible future support for other operating systems (Solaris, OSX, Windows?)

Self-sufficient



A Docker container contains everything it needs to run:

  • Minimal Base OS
  • Libraries and frameworks
  • Application code

A docker container should be able to run anywhere that Docker can run. 

DOCKER ARCHITECTURE


History of virtualization


IBM 360 (1968)

HARDWARE Virtualization

  •  1966-1972 IBM CP/CMS
  •  1989 Insignia SoftPC
  •  1997 Connectix VirtualPC
  •  1999 VMWare Workstation
  •  199x-2002 Xen
  •  2001 IBM AIX LPAR
  •   2006 Amazon EC2
  •  2007 Sun Logical Domains
  •  2007 Linux KVM
  •  2007 InnoTek VirtualBox
  •  2008 MS Hyper-V





"I once heard that hypervisors are the living proof of operating system's incompetence"


        Glauber Costa/LinuxCon 2012

PROCESS VIRTUALIZATION

  •  1979-1982 UNIX chroot
  •  1998 FreeBSD jail
  •  2001 Parallels Virtuozzo
  •  2001 Linux-VServer
  •  2005 Solaris Containers
  •  2005 OpenVZ
  •  2008 Linux LXC
  •   2007+ PAAS:
       Heroku, Joyent, CloudFoundry
  •  2013 Docker

 

RUNNING DOCKER

PULLING an image

RUNNING CONTAINERS

Performance

 Startup under .5 sec
less than 5% penalty
less than 5% difference

COMMITTING CHANGES

 

IMAGES ARE A DAG

IMMUTABLE SERVERS


With all this virtualization, why do we still manage virtual servers like mainframes?


Modern systems have a ridiculous amount of configuration state (packages, settings, etc.).


We try to manage state with tools like CFEngine, Chef, & Puppet (or via massive amounts of labor).      


The current immutable server practice in is to use Chef/Puppet to build OS images and deploy them to a cloud.


 



IMMUTABLE SERVERS


Physical server lifetime is measured in years.


A container's lifetime can only be a few seconds.


Treat containers like a build artifact. 


If you need to make changes, build a new container.

Dockerfiles


Create a Java 1.7 container

Dockerfiles


Build a Tomcat container from our Java layer

SUMMARY


  •  Easy to build, run & share containers

  •  Rapidly expanding ecosystem

  •  Better performance vs. VMs

  •  Layered filesystem gives us git-like control of images.

  •  Reduces complexity of system builds



THE FUTURE IS EXCITING


     Lean base operating systems optimized for containers. (CoreOS)
       

      New operational models:

        •  Automated routing
        •  Distributed consensus (Paxos, Raft)
        •  Service Discovery
        •  Software Defined Networking
        •  Distributed scheduling (Mesos)

        ONE LAST THING


        today:

        Image credits


        IBM 360: http://plyojump.com/classes/mainframe_era.php
        SpongeBob: http://i908.photobucket.com/albums/ac281/Misao_bucket/spongebob_imagination_by_kssael_display.png


        DOCKER

        By Steven Borrelli