/docker-demo

Demo of Docker (Dockerfile and docker-compose.yml).

Primary LanguageShell

Introduction to Docker

Watch Jake Wright's excellent videos (in really 12:00 minutes!):

What is Docker?

“Docker enables true independence between applications and infrastructure and developers and IT ops to unlock their potential and creates a model for better collaboration and innovation.”

Read more

Comparing Virtual Machines and Containers

**Virtual Machines** **Containers**
![Virtual Machine](https://www.docker.com/sites/default/files/VM%402x.png) ![Container](https://www.docker.com/sites/default/files/Container%402x.png)
Each VM = full copy OS & co
=> resource heavy
=> minutes to load
Each container = no kernel
=> lightweight
=> seconds to load

Read more

Benefits

  • Machines are scripted
  • No install headaches
  • Same environment everywhere
  • Sandboxed projects

Image & Container

Image:

  • A template of a machine
  • Contains OS & services

Container:

  • A running instance� of an image

Dockerfile

A recipe to build an image:

  • Extend a base image
  • Execute custom commands
  • Run a single process

In action:

  • Build a Dockerfile => image
  • Run an image => container

Read more: CLI / Dockerfile

Demo

Run: ./demo1.sh

Docker Compose

A recipe to build several services:

  • Configure each service:
    • Base image or build commands
    • Environment variables
    • Container configuration (name, ports…)
    • Dependencies and links between services
    • Volumes mapping

Read more / CLI / docker-compose.yml

Demo

Run: ./demo2.sh

Docker Hub & Registry

@TODO