introduction to containers and docker

Download Introduction to Containers and Docker

Post on 13-Feb-2017

251 views

Category:

Technology

2 download

Embed Size (px)

TRANSCRIPT

  • BADCamp 2015DevOps Summit

    Introduction to Containers and Docker

    @RobLoach

  • Kalamuna.

    I build tools to bring great ideas into reality.

    RobLoach

    RobLoach

    rob@kalamuna.com

    Rob Loach

  • About UsKalamuna makes the Internet for rabble-rousing organizations driven to tinker, critique, and change the way things are. We specialize in design, strategy, user experience, and development.

  • Containers

  • But first.

  • Why?

  • I can build environments!

  • But after a while...

    B

  • Matrix From Hell

  • Matrix From Hell

  • Matrix From Hell

  • Managing and DeployingCode is Hard

  • Virtualization?

    VirtualBox

    VMWare

    Vagrant

    Puppet

    Chef

    etc

  • AWESOME!.... Buuuuuuuut

    Slow performance

    Images require a lot of space

    Can be complex to set up

    Updating takes forever

  • Containers!

  • Containers

    Single-service provider Build once, run everywhere Re-usable software components Bind and link services Improve dependency management Natively part of Linux runtime Shared Kernal-space

  • Docker

    Easy to use interface around Containers

    Single Dockerfile configuration Hub to share environments Runs everywhere

  • Create a Container for each Service

  • Ship each individual Container

  • Fixes Matrix From Hell

  • Great Scott!

  • But how?

  • 1. Install Docker

    http://docker.io

  • 2. Create a Dockerfile

    FROM UbuntuRUN apt-get install nginxADD . /webEXPOSE 80

  • 3. Build the Image

    docker build -t myapp .

  • 4. Run it!

    docker run -d -p 80:80 myapp

  • GIVE ME MORE!

    Docker Compose

    Orchestrate and link up a set of containers

    Docker Swarm

    Clustering of Docker containers, allowing creation and access to a pool of hosts

    Docker Hub

    Registry of Docker containers and images - Privately or Publicly

  • 5. Link Containers with Docker Compose

    web: build: . ports: - "80:80" links: - mysqlmysql: image: mysql

  • 6. Share on Docker Hub

  • KalaBox

    Drupal development environment through Docker containers

  • Thank You!

    www.kalamuna.comrob@kalamuna.comhttp://robloach.net

    @RobLoach

    mailto:rob@kalamuna.commailto:rob@kalamuna.comhttp://robloach.nethttp://robloach.net