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

The Docker Platform

The Docker Platform

Avatar for Bence Dányi

Bence Dányi

April 15, 2015
Tweet

More Decks by Bence Dányi

Other Decks in Programming

Transcript

  1. Short history Solomon Hykes dotCloud (PaaS) internal project Open sourced

    in March, 2013 2015: 20000+ github stars, 900 contributors
  2. Docker containers Like a VM instance Drivers LXC libcontainer (default

    from version 0.9) other drivers (kvm, etc.) Isolation: cgroups Memory Network CPU $ docker run --rm -p 8080:8080 -m 512m busybox nc -l -p 8080
  3. Docker images Read-only layers Read-write top layer Backends AUFS (file

    level) devicemapper (block level) btrfs (snapshot based) vfs (fallback) Images git commits
  4. Dockerfiles Simple commands (ADD, RUN, CMD, etc.) $ docker build

    -t image-name . FROM debian:jessie RUN apt-get update && \ apt-get install htop CMD htop
  5. Docker Hub hub.docker.com image registry official docker images anyone can

    publish (hub.docker.com/u/lennon/) automated image builds open source (you can host your own registry)
  6. Docker machine Provision VMs (set up docker runtime) Drivers VirtualBox

    Amazon, Azure, DigitalOcean, Google Compute Engine, Softlayer, OpenStack, RackSpace, VMware IK Cloud? :) $ docker-machine create --driver virtualbox felho $ docker-machine ls $ docker-machine env felho
  7. Docker compose Fig Start & link containers from .yml configuration

    $ docker-compose up web: build: . command: python app.py ports: - "5000:5000" volumes: - .:/code links: - redis redis: image: redis
  8. Docker swarm Docker host pool -> one virtual docker host

    Service discovery (etcd, consul, zookeeper, static ips, etc) Strategies (random, binpack, roll your own) Filters Constraints (storage driver, execution driver, os, custom labels) Affinity (container, image, dependency, etc)