Docker

Gilson Filho

What is

Docker Begins

What is Docker ?

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

docker.io

What is Docker ?

VIRTUAL MACHINEs

VIRTUAL MACHINEs

Docker containers

Docker containers

Docker containers

VM

Docker

Docker Background

LXC =

OS-level virtualization for running multiple isolated Linux systems

"LINUX CONTAINERS"

cgroups =

Linux kernel feature that limits and isolates the resource usage

(CPU, disk I/O, network, etc.)

"CONTROL GROUPS"

AUFs =

Filesystem which is based on images where every modification is a diff from the previous one (Like commits in git)

"Adv. multi layered Unification FS"

How to Install

HOW TO INSTALL ?

http://docs.docker.com/installation

HOW TO INSTALL ?

http://docs.docker.com/installation

Linux

Debian

Fedora

Ubuntu

Windows e OS X

Docker HUB

Over 1.2B Pulls

from Docker Hub

5.6M

65

240K

Pulls per Day

Pulls per Second

Repositories on Docker Hub

Dockerfile

 A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

Dockerfile

Images

 

 [Definition of docker images]

Containers

[Definition of docker containers]

Container Lifecycle

Docker commands

Orquestration

App

Database

link

App

link

Storage

link

Storage

link

link

App

Database

link

App

link

Storage

link

Storage

link

link

Docker Host

Docker Host

Docker Host

Docker Host

Docker Host

Orquestration

Orchestration is a broad term that refers to the container scheduling, cluster management, and possibly the provision of additional hosts.

Tools

  • Docker Swarm
  • Fleet
  • Kubernetes
  • Mesos

Docker Compose

 Compose is a tool for defining and running multi-container Docker applications.

Docker Compose

  1. Define your app’s environment with a Dockerfile so it can be reproduced anywhere.

  2. Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.

  3. Lastly, run docker-compose up and Compose will start and run your entire app.

version: '2'
services:
  db:
    image: mysql:5.7
    volumes:
      - "./.data/db:/var/lib/mysql"
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: wordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress

  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    links:
      - db
    ports:
      - "8000:80"
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_PASSWORD: wordpress

docker-compose.yml

Docker Compose commands

Books

Email: gilson.filho@basis.com.br

me@gilsondev.in

Skype: gilson.filho.basis

Questions?

Made with Slides.com