Slide 1

Slide 1 text

Simplify your dev life with Docker Vladimír Kriška (@ujovlado) WebElement Banská Bystrica

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Yo Dawg, I heard you like computers So I put computer into computer, So you can computer while you computer

Slide 5

Slide 5 text

What is Docker? "Docker is an open platform for building, shipping and running distributed applications."

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

OK, let's go Three basic steps 1) Create Dockerfile 2) Build it 3) Run it

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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)

Slide 12

Slide 12 text

Case III Multiple containers with separate store ● For production environment ● Hard to setup ● Deployment?

Slide 13

Slide 13 text

Examples

Slide 14

Slide 14 text

Thanks