D        CKER

package once Deploy anywhere

Ouadie LAHDIOUI

IT Consultant @ SOAT

WHO's THIS GUY ?

@lahdiouiouadie

story time !

*Image source : Devoops culture comic by DZone

This is how we maked agile delivery during 7 sprints

*Image source : Devoops culture comic by DZone

This is OUR NEW FEATURE TEAM

Always the same reasons

WTF...It works fine for me !

WTF.... We haven't the same version of NodeJS !

Don't forget to do that on PPRD

D        CKER

Wikipedia defines Docker as

An open-source project that automates the deployment of applications inside software containers...provides an additional layer of abstraction and automation of operating-system-level virtualization on Windows and Linux.

In simpler words

Docker is an open-source tool to build and deploy your distributed applications easily in a sandbox that can be run on any linux host later

(called container later)

CONTAINERS ! What are those ?

Containers are like VMs !

This is how VMs works

This is how actually containers works

Containers are

Created based on

Docker images

This is your base image

This is a container

To run and distribute

Docker containers

YOU NEED

A Docker Daemon

DOCKER HOST

DOCKER DAEMON

DOCKER containers

Tensorflow

REDIS

CHATBOT

Web APP

To interact with the

docker daemon

you must have

a Docker Client

DOCKER HOST

DOCKER DAEMON

DOCKER containers

Tensorflow

REDIS

CHATBOT

Web APP

DOCKER client

DOcker run | docker pull | ...

To CREATE YOUR OWN IMAGE

YOU SHOULD USE

Dockerfile

FROM ubuntu
MAINTAINER Ouadie LAHDIOUI

RUN apt-get install -y software-properties-common python
RUN add-apt-repository ppa:chris-lea/node.js
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y nodejs
#RUN apt-get install -y nodejs=0.6.12~dfsg1-1ubuntu1
RUN mkdir /var/www

ADD app.js /var/www/app.js

CMD ["/usr/bin/node", "/var/www/app.js"] 

This is how A docker file looks like

Dockerfile itself inherits from another base image

FROM ubuntu
MAINTAINER Ouadie LAHDIOUI

RUN apt-get install -y software-properties-common python
RUN add-apt-repository ppa:chris-lea/node.js
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y nodejs
#RUN apt-get install -y nodejs=0.6.12~dfsg1-1ubuntu1
RUN mkdir /var/www

ADD app.js /var/www/app.js

CMD ["/usr/bin/node", "/var/www/app.js"] 

DOCKER IMAGE

Inherit from

DOCKER IMAGE

DOCKER IMAGE

Inherit from

Inherit from

To SHARE YOUR DOCKER IMAGE ON THE CLOUD, YOU CAN USE

A PUBLIC/PRIVATE

 DOCKER REGISTRY

1) BUILD

DOCKER image

2) Publish

Registry

https://hub.docker.com

This is DOCKER HUB

Docker landscape

Getting your hands dirty with Docker

live coding

CLONE THIS PROJECT FROM GITHUB

https://github.com/ouadie-lahdioui/docker-CHEATSHEET

put some music on

3...2...1...ROTI

Return on time invested

If you loved Docker, let me know  >

@lahdiouiouadie

Thank you for your attention

Docker : Package once, deploy anywhere

By Ouadie LAHDIOUI

Docker : Package once, deploy anywhere

Docker : Package once, run anywhere

  • 1,670