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

Simplify your dev life with Docker (WebElement Banská Bystrica)

Simplify your dev life with Docker (WebElement Banská Bystrica)

Vladimír Kriška

August 20, 2015

More Decks by Vladimír Kriška

Other Decks in Programming


  1. Past (vedle pasti) • New computer • Install Apache|Nginx, MySQL|PostgreSQL,

    PHP, MongoDB, etc., etc. • Start services … start coding After few weeks • OMG this project needs newer version of MySQL • Problems • And problems
  2. Future • New computer • Prepare Dockerfile with exact requirements

    • Build it • Run it (with services inside) … start coding After few weeks • OMG this project needs … whatever • Never mind, I'll build a new container • Profit
  3. Yo Dawg, I heard you like computers So I put

    computer into computer, So you can computer while you computer
  4. What is Docker? "Docker is an open platform for building,

    shipping and running distributed applications."
  5. What is Docker for me? Primary • Engine for working

    with containers • Any virtual machine • Testing platform • Tool to not install "shit" to your computer Not yet • Running in production
  6. What really Docker is? Same as your system • Set

    of files with "/sbin/init" file So, you can • Take parts of your system and virtualize them without need to virtualize full OS
  7. Containers without Docker (!) https://chimeracoder.github.io/docker-without-docker mkdir debian-tree debootstrap --arch=amd64 unstable

    debian-tree systemd-nspawn -D debian-tree/ /bin/bash machinectl list machinectl poweroff debian-tree
  8. Dockerfile & Build & Run FROM debian:jessie RUN apt-get update

    && apt-get upgrade -y RUN apt-get install nginx -y RUN mkdir -p /data COPY package.tar.gz /data/ EXPOSE 80 docker build -t wblmnt/bb . docker run -i -t --rm -p 8037:80 wblmnt/bb:latest
  9. Case I & Case II Everything in one container •

    Easy to start • Same as any virtual machine / container • Need to commit changes at the end (as many times as containers count)
  10. Case III Multiple containers with separate store • For production

    environment • Hard to setup • Deployment?