Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cool Things About Docker

Theo Pak
September 30, 2015

Cool Things About Docker

Theo Pak

Cimpress Infrastructure Core Engineering Lightning Talk: Wed Sept 30, 2015 @ 10:30am in Waltham, MA.

Theo Pak

September 30, 2015

More Decks by Theo Pak

Other Decks in Technology


  1. Linux Containers • A container is an isolated, 

    controlled, portable environment 
 for your application • Containers are lightweight • Microservices ❤ Containers • Linux containers prd ready on Docker 1.5 • Windows containers coming in 
 Windows Server 2016
  2. Containers Containers are perfect for microservices - faster deployments -

    near zero startup penalty - highly automatable - resource, network, content isolation - dependency isolation Code that describes the application environment.
  3. Build an Image Infrastructure as code: Containers are 

    exact environment (but not a whole VM).
 $ git add Dockerfile
 $ git commit -m “Dev and Ops run the same Dockerfile” A Dockerfile defines a container image. 
 Images layer additively.
 $ cat Dockerfile
 FROM ubuntu
 RUN apt-get -y install ruby ruby-dev sensu
 COPY ./dist /var/my_app/
 CMD ["./start.sh"] Linux Containers are lightweight and perfect for microservices. 
 Virtually zero added cost to application startup/restart.
 $ docker build # build an image from the Dockerfile
 $ docker run # run an instance of an image
  4. Run an Image as a Container • No different DEV,

    CIT, PRD environments • Exactly one environment: the container • The same container runs on 
 your machine, Jenkins, AWS, etc • Expect your build to be identical on localhost, Jenkins, and prd. • Now, your source repo captures as much as possible about the application. • DevOps people are experts. Use their images as base.
  5. puppet apply inside a container Use Puppet? Consul, Vagrant, Terraform?

    Auspice? You can get some of the benefits of containers in combination with complimentary tools. COPY puppet /etc/puppet
 RUN cd /etc/puppet \
 && librarian-puppet update
 RUN puppet apply /etc/puppet/manifests/default.pp \
 —-modulepath=‘/etc/puppet/modules' \
  6. Container-Oriented Design • Containers are isolated, resource-controlled, and portable •

    Containers are lightweight: you can run more containers than VMs on the same hardware • Containers are instances of Images. 
 Images are made of other Images. • You can get some of the benefits of containers in combination with a configuration managed by Puppet