Why Docker?

Introduction to Docker

Lalet Scaria<laletscaria@gmail.com> / lalet.me

Cargo Transport Pre-1960

Container

Solution: Intermodal Shipping Container

docker.io

What is Docker?

Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application

Source: docker.io

What is a Container?

  • Group of processes contained in a Isolated Environment
  • Isolation provided by Concepts like cgroups and namespaces

BUILD SHIP & RUN
ANY APP, ANYWHERE

Brief comparison

Hypervisor vs Docker Container

Hypervisor Docker
[1] [2] [3]
Runs operating systems Runs processes
Heavyweight isolated virtual machines Lightweight kernel namespaces [*]
VMs start via a full boot-up process Very fast namespace + process creation [**]
Platform-oriented solution Service-oriented solution
Optimized for generality Optimized for minimalism and speed

Docker’s architecture

Inside Docker

  • Docker images.
  • Docker registries.
  • Docker containers.

Docker hub

https://hub.docker.com

Dockerfile



FROM        ubuntu
MAINTAINER  John Doe (john@doe.com)

LABEL Description="start the foobar executable" 

# Apt update
RUN apt-get update
RUN apt-get install -y inotify-tools 

# Install Nginx and OpenSSH
RUN nginx openssh-server
RUN bash -c "./somescript.sh"

# Install Nodejs, bla bla ....
						


FROM        node:510
MAINTAINER  John Doe (John Doe@doe.com)

# replace this with your application's default port
EXPOSE 8888
						

$ docker build -t nodejs-app .
$ docker run -it --rm --name ahihi nodejs-app
						

Docker on Cloud

Who use?

Slide: Docker Ecosystem on Azure

Slide: Running Docker with OpenStack

THANK YOU

- Docker homepage: https://www.docker.com
- Why docker? https://lalet.github.io/why-docker