Why Docker?

Introduction to Docker

Van-Duyet Le <[email protected]> / duyetdev.com

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
  • IsolaNon 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  Victor Vieux ([email protected])

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  Van-Duyet Le ([email protected])

# 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
- Docker slides: http://saveto.co/t/docker
- Why docker? https://why-docker.talk.duyetdev.com