SlideShare una empresa de Scribd logo
1 de 100
Descargar para leer sin conexión
DOCKER, ÇA MANGE QUOI AU
PRINTEMPS ?
Introduction à Docker et son écosystème
QUI SUIS-JE ?
Julien Maitrehenry
DevOps at PetalMD
jmaitrehenry.ca

https://github.com/jmaitrehenry

@jmaitrehenry
AGENDA
AGENDA
▸ Le problème initial
AGENDA
▸ Le problème initial
▸ Mais qu’est-ce que Docker ?
AGENDA
▸ Le problème initial
▸ Mais qu’est-ce que Docker ?
▸ L’écosystème
AGENDA
▸ Le problème initial
▸ Mais qu’est-ce que Docker ?
▸ L’écosystème
▸ Quelques cas d’usage
AGENDA
▸ Le problème initial
▸ Mais qu’est-ce que Docker ?
▸ L’écosystème
▸ Quelques cas d’usage
▸ Démo
LE PROBLÈME
LE PROBLÈME - QUOI QUI VA OÙ ?
LE PROBLÈME - LA MATRICE DE LA MORT
LE PROBLÈME DU TRANSPORT PRE-1960
LE PROBLÈME - UNE AUTRE MATRICE
LA SOLUTION - LE CONTENEUR
LE SOLUTION - LE CONTAINER DOCKER
MATRICE RÉGLÉ !
QU’EST-CE
DOCKER ?
On est là pour ça
après tout !
QU’EST-CE DOCKER ?
Docker est la principale plateforme pour les conteneurs
Développeurs Utilise Docker pour éliminer le problème du “ça marche sur mon poste”
Admin Système
Utilise Docker pour rouler et gérer des apps fonctionnant côte à côte
dans des conteneurs isolées
Entreprise
Utilise Docker pour construire des pipelines agiles pour livrer de
nouvelles fonctionnalités plus rapidement, plus sécuritaire, plus
facilement scalable et avec une plus grande confiance
ÉVOLUTION DE LA PLATEFORME DOCKER
▸ Un seul but
▸ Communauté des développeurs

sous linux seulement
ÉVOLUTION DE LA PLATEFORME DOCKER
Développeurs Ops Entreprises Ecosystème
Besoin d’expérimenter 

et d’innover avec des
technologies à jour
Besoin d’un système
prévisible pour
déployer et faire
tourner des apps
Fait tourner des apps
business critiques
scalable et n’importe
où
Ajouter de la valeur et
étendre une
plateforme avec un
moyen commun de
monétisation
LA PLATEFORME DOCKER
Développeurs Ops Entreprises Ecosystème
Une plateforme
Pour les développeurs et les équipes TI
Sur Linux et Windows
On premise et dans le nuage
Apps traditionnelles, vendeur de solution, microservices
DOCKER COMMUNITY EDITION (CE) ET DOCKER ENTERPRISE EDITION (EE)
▸ Plateforme Docker gratuite 

pour les Devs et Ops “do it yourself”
▸ Release mensuelle avec les dernières

fonctionnalités pour les développeurs
▸ Release trimestrielle avec maintenance

pour les Ops
▸ Plateforme CaaS avec un abonnement

(inclue l’orchestration des containers, 

la gestion et la sécurité)
▸ Support de niveau entreprise
▸ Release trimestrielle avec 1 ans de 

support chaque incluant les patches et 

hotfixes
▸ Technologie certifiée: Infrastructure, 

plugins et container
VERSIONS ET SUPPORT
▸ NEW! Les versions de Docker suit maintenant le format YY.MM
▸ `docker-engine` package n’existe plus, c’est maintenant `docker-ce` et `docker-ee`
“C’est cool tout ça, mais c’est quoi
Docker ?
-Un anonyme
QU’EST-CE QU’UN CONTENEUR ?
▸ Packaging standardisé pour les apps
et leurs dépendances
▸ Isole les apps l’une de l’autre
▸ Partage le même Kernel que l’OS
▸ Fonctionne sur les principales
distributions Linux
▸ Natif dans Windows Server 2016
LA DIFFÉRENCE ENTRE UN CONTENEUR ET UNE VM
Un conteneur est un élément
au niveau applicatif
Une VM est un élément au niveau 

de l’infrastructure
CONTENEURS ET VMS ENSEMBLE
L’utilisation des conteneurs et des VMs permet une plus grande flexibilité

pour déployer et gérer des apps de manière optimale
“Mais en plus concret, c’est quoi un
container ?
-Un autre anonyme
C’EST UNE IMAGE AVEC
UN LAYER EN R/W
“Heu… une image ? Un layer ?
-Le même anonyme
IMAGE
▸ Une image est une référence à une liste de layer en “read only”
▸ Les layers sont stacké l’un au dessus de l’autre pour former le
filesystem
▸ Chaque layers peuvent être utilisé par plusieurs images
▸ Le driver de stockage de Docker est responsable de stacké les
images et de fournir une vue unifié
CONSTRUIRE UNE IMAGE
FROM mhart/alpine-node:6
ENV SERVICE_3000_NAME selfpro
WORKDIR /src
ADD . .
RUN apk add --update --no-cache git && 

npm install
EXPOSE 3000
CMD npm start
Dockerfile
CONSTRUIRE UNE IMAGE
CONSTRUIRE UNE IMAGE
~/work/selfpro  docker build -t petalmd/selfpro -f docker/Dockerfile .
CONSTRUIRE UNE IMAGE
~/work/selfpro  docker build -t petalmd/selfpro -f docker/Dockerfile .
Sending build context to Docker daemon 1.398 MB
Step 1 : FROM mhart/alpine-node:6
---> 2e8721f40082
Step 2 : ENV SERVICE_3000_NAME selfpro
---> Running in cd8e6156fbec
---> 9d9b1f86a696
Removing intermediate container cd8e6156fbec
[...]
Step 7 : CMD npm start
---> Running in 71bab8276b39
---> cce4c583c3a0
Removing intermediate container 71bab8276b39
Successfully built cce4c583c3a0
CONSTRUIRE UNE IMAGE
CONSTRUIRE UNE IMAGE
~/work/selfpro  docker history cce4c583c3a0
CONSTRUIRE UNE IMAGE
~/work/selfpro  docker history cce4c583c3a0
IMAGE CREATED CREATED BY SIZE
cce4c583c3a0 2 minutes ago /bin/sh -c #(nop) CMD ["/bin/sh" "-c" "npm s 0 B
110c49285fe1 2 minutes ago /bin/sh -c #(nop) EXPOSE 3000/tcp 0 B
579469b24848 2 minutes ago /bin/sh -c apk add --update --no-cache git && 54.16 MB
5b34c5ef9a7f 3 minutes ago /bin/sh -c #(nop) %s %s in %s ADD dir:b07dd1 1.044 MB
6ba4a61f509a 3 minutes ago /bin/sh -c #(nop) WORKDIR /src 0 B
9d9b1f86a696 3 minutes ago /bin/sh -c #(nop) ENV SERVICE_3000_NAME=self 0 B
2e8721f40082 3 weeks ago /bin/sh -c apk add --no-cache curl make gcc g 41.44 MB
<missing> 3 weeks ago /bin/sh -c #(nop) ENV VERSION=v6.2.1 NPM_VERS 0 B
<missing> 3 weeks ago /bin/sh -c #(nop) ADD file:701fd33a2f463fd4bd 4.799 MB
CONSTRUIRE UNE IMAGE
~/work/selfpro  docker history cce4c583c3a0
IMAGE CREATED CREATED BY SIZE
cce4c583c3a0 2 minutes ago /bin/sh -c #(nop) CMD ["/bin/sh" "-c" "npm s 0 B
110c49285fe1 2 minutes ago /bin/sh -c #(nop) EXPOSE 3000/tcp 0 B
579469b24848 2 minutes ago /bin/sh -c apk add --update --no-cache git && 54.16 MB
5b34c5ef9a7f 3 minutes ago /bin/sh -c #(nop) %s %s in %s ADD dir:b07dd1 1.044 MB
6ba4a61f509a 3 minutes ago /bin/sh -c #(nop) WORKDIR /src 0 B
9d9b1f86a696 3 minutes ago /bin/sh -c #(nop) ENV SERVICE_3000_NAME=self 0 B
2e8721f40082 3 weeks ago /bin/sh -c apk add --no-cache curl make gcc g 41.44 MB
<missing> 3 weeks ago /bin/sh -c #(nop) ENV VERSION=v6.2.1 NPM_VERS 0 B
<missing> 3 weeks ago /bin/sh -c #(nop) ADD file:701fd33a2f463fd4bd 4.799 MB
~/work/selfpro  docker history petalmd/selfpro
AVANTAGES DES IMAGES
▸ Chaque layers peuvent être utilisé par plusieurs images
▸ Une image peut être construite au dessus d’une autre image
▸ Un site static peut être construit par dessus l’image de nginx,
qui peut, elle même être construit par dessus alpine Linux
▸ Construire une image peut se résumer à juste reconstruire le
dernier layer
EXEMPLE D’IMAGE
/bin/sh -c #(nop) ADD file:614a9122187935fccf 4.797 MB
addgroup -S redis && adduser -S -G […]
apk add --no-cache ‘su-exec>=0.2' […]
ENV REDIS_VERSION=3.2.1
CMD ["redis-server"]
[9 other layers]
MAINTAINER NGINX Docker Maintainers
ENV NGINX_VERSION=1.11.1
EXPOSE 443/tcp 80/tcp
CMD ["nginx" "-g" "daemon off;”] 0 B
[5 other layers]
alpine:3.3
redis:alpine nginx:alpine
DOCKER ECOSYSTÈME
DOCKER ENGINE
▸ Client-Server application qui permet:
▸ Gérer des images
▸ Gérer des conteneurs
▸ Gérer des réseaux
▸ Gérer des volumes
▸ Possède une API REST et un CLI
DOCKER COMPOSE
▸ Définie une application multi-
containers utilisants plusieurs
dépendances dans un seul fichier
▸ Contient la structure et la
configuration en une place
▸ Démarre (ou arrête) une application
en une seul command
DOCKER COMPOSE
DOCKER COMPOSE
Containers
DOCKER COMPOSE
Containers
Gestion des dépendances
DEMO
DEMO
~/work/wordpress  docker-compose up -d
Creating network "wordpress_default" with the default driver
Creating volume "wordpress_db_data" with default driver
Creating wordpress_mysql_1
Creating wordpress_wordpress_1
DEMO
~/work/wordpress  docker-compose up -d
Creating network "wordpress_default" with the default driver
Creating volume "wordpress_db_data" with default driver
Creating wordpress_mysql_1
Creating wordpress_wordpress_1
~/work/wordpress  docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------------------
wordpress_mysql_1 docker-entrypoint.sh mysqld Up 3306/tcp
wordpress_wordpress_1 docker-entrypoint.sh apach ... Up 0.0.0.0:8080->80/tcp
DEMO
~/work/wordpress  docker-compose up -d
Creating network "wordpress_default" with the default driver
Creating volume "wordpress_db_data" with default driver
Creating wordpress_mysql_1
Creating wordpress_wordpress_1
~/work/wordpress  docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------------------
wordpress_mysql_1 docker-entrypoint.sh mysqld Up 3306/tcp
wordpress_wordpress_1 docker-entrypoint.sh apach ... Up 0.0.0.0:8080->80/tcp
DOCKER REGISTRY
▸ Stock et distribue les images Docker
▸ De nombreux Registry hébergés
disponibles:
▸ Docker Hub, AWS ECR, …
▸ Peut être self-hosted avec plusieurs
intégrations pour le stockage:
▸ Local, AWS S3, Ceph, OpenStack
Swift, …
DOCKER MACHINE
▸ Provisionne et configure Docker sur
un serveur distant
▸ Fonctionne avec la plus part des
cloud providers
▸ AWS / GCE / Azure / DO / IBM
▸ Fonctionne aussi avec des
technologies standards
▸ OpenStack / vCenter
DOCKER MACHINE
DOCKER MACHINE
~/work  docker-machine create 
--driver digitalocean 
--digitalocean-size 1gb 
--digitalocean-region tor1 
--digitalocean-access-token xxx
DOCKER MACHINE
Running pre-create checks...
Creating machine...
(swarm1) Creating SSH key...
(swarm1) Creating Digital Ocean droplet...
(swarm1) Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
DOCKER MACHINE
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this
virtual machine, run: docker-machine env swarm1
DOCKER MACHINE
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this
virtual machine, run: docker-machine env swarm1
~/work  eval $(docker-machine env swarm1)
DOCKER MACHINE
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this
virtual machine, run: docker-machine env swarm1
~/work  eval $(docker-machine env swarm1)
~/work  docker info
DOCKER MACHINE
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this
virtual machine, run: docker-machine env swarm1
~/work  eval $(docker-machine env swarm1)
~/work  docker info
CPUs: 1
Total Memory: 992.4MiB
Name: swarm1
Labels:
provider=digitalocean
DOCKER SWARM
▸ Transforme un groupe de serveurs docker en
un cluster
▸ Gestion du cluster inclue dans le Docker
Engine
▸ Décentralisé
▸ Declarative service model
▸ Scaling
▸ Secure by default
▸ Service discovery
▸ Multi-host networking
▸ Rolling Update
DOCKER SWARM
DOCKER SWARM
~/work  docker swarm init --advertise-addr 138.197.149.25
DOCKER SWARM
~/work  docker swarm init --advertise-addr 138.197.149.25
Swarm initialized: current node (fymao87flfrbkstg7gyzdx4ov) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join 
--token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 
138.197.149.25:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow
the instructions.
DOCKER SWARM
DOCKER SWARM
~/work  docker swarm join 
--token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 
138.197.149.25:2377
DOCKER SWARM
~/work  docker swarm join 
--token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 
138.197.149.25:2377
This node joined a swarm as a worker.
DOCKER SWARM
~/work  docker swarm join 
--token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 
138.197.149.25:2377
This node joined a swarm as a worker.
~/work  docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
c2lyl7ail0r68c141zidbovpl swarm2 Ready Active
fymao87flfrbkstg7gyzdx4ov * swarm1 Ready Active Leader
DOCKER CLOUD
▸ Solution commerciale de Docker
pour faire des pipelines de CI / CD
▸ Se hook sur Github et Bitbucket pour
construire des images et les
déployer automatiquement
▸ Utilise nos serveurs ou se branche
sur des cloud providers
▸ Facturation par node par heure
USE CASE
Mais comment ça peut m’être
utile ?
CONTINUOUS INTEGRATION
CONTINUOUS INTEGRATION
Jenkins Master Jenkins Slave Docker Registry
• Jenkins in Docker
• Auto provisionning
• Only docker running
on host
• Jenkins agent running
in Docker
• For storing Docker
image
• Private or public
• On promise or not
CI / CD
If the test is successful, 

the image is pushed to the 

Registry
STAGING AUTO DEPLOYING WITH
WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
▸ Construire une nouvelle version à chaque git push
STAGING AUTO DEPLOYING WITH WORDPRESS
▸ Construire une nouvelle version à chaque git push
▸ Construire une image pour Wordpress et une autre pour
MySQL
STAGING AUTO DEPLOYING WITH WORDPRESS
▸ Construire une nouvelle version à chaque git push
▸ Construire une image pour Wordpress et une autre pour
MySQL
▸ Déployer automatiquement à chaque build
STAGING AUTO DEPLOYING WITH WORDPRESS
▸ Construire une nouvelle version à chaque git push
▸ Construire une image pour Wordpress et une autre pour
MySQL
▸ Déployer automatiquement à chaque build
▸ Avoir une URL utilisable
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
STAGING AUTO DEPLOYING WITH WORDPRESS
RESSOURCES
RESSOURCES
▸ Labs en ligne: https://training.docker.com/self-paced-online
RESSOURCES
▸ Labs en ligne: https://training.docker.com/self-paced-online
▸ Utiliser docker en ligne: http://play-with-docker.com
RESSOURCES
▸ Labs en ligne: https://training.docker.com/self-paced-online
▸ Utiliser docker en ligne: http://play-with-docker.com
▸ Communauté et channel slack: https://www.docker.com/
docker-community
RESSOURCES
▸ Labs en ligne: https://training.docker.com/self-paced-online
▸ Utiliser docker en ligne: http://play-with-docker.com
▸ Communauté et channel slack: https://www.docker.com/
docker-community
▸ Docker Meetup Québec: https://www.meetup.com/fr-FR/
Docker-Quebec-Meetup/
RESSOURCES
▸ Labs en ligne: https://training.docker.com/self-paced-online
▸ Utiliser docker en ligne: http://play-with-docker.com
▸ Communauté et channel slack: https://www.docker.com/
docker-community
▸ Docker Meetup Québec: https://www.meetup.com/fr-FR/
Docker-Quebec-Meetup/
▸ Docker Meetup Montréal: https://www.meetup.com/fr-FR/
Docker-Montreal/
DÉMO
ASK
ALL THE QUESTIONS

Más contenido relacionado

La actualidad más candente

Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...Cédric Leblond
 
NightClazz Docker Découverte
NightClazz Docker Découverte NightClazz Docker Découverte
NightClazz Docker Découverte Zenika
 
Gérer son environnement de développement avec Docker
Gérer son environnement de développement avec DockerGérer son environnement de développement avec Docker
Gérer son environnement de développement avec DockerJulien Dubois
 
Varnish & blue/green deployments
Varnish & blue/green deploymentsVarnish & blue/green deployments
Varnish & blue/green deploymentsOxalide
 
Migrer de Jenkins vers Azure DevOps les Builds Java
Migrer de Jenkins vers Azure DevOps les Builds JavaMigrer de Jenkins vers Azure DevOps les Builds Java
Migrer de Jenkins vers Azure DevOps les Builds JavaCédric Leblond
 
Cedric leblond migrer jenkins AWS vers Azure Devops
Cedric leblond migrer jenkins AWS vers Azure DevopsCedric leblond migrer jenkins AWS vers Azure Devops
Cedric leblond migrer jenkins AWS vers Azure DevopsFactoVia
 
Gulp fiction, Builder, tester, livrer, sans tomber dans les poms - breizhcam...
Gulp fiction, Builder, tester, livrer, sans tomber dans les poms  - breizhcam...Gulp fiction, Builder, tester, livrer, sans tomber dans les poms  - breizhcam...
Gulp fiction, Builder, tester, livrer, sans tomber dans les poms - breizhcam...mbrechet
 
Distribuer une application avec Symfony & Docker *
Distribuer une application avec Symfony & Docker *Distribuer une application avec Symfony & Docker *
Distribuer une application avec Symfony & Docker *Thierry M.
 
Docker le buzz est il justifié ?
Docker le buzz est il justifié ? Docker le buzz est il justifié ?
Docker le buzz est il justifié ? Romain Chalumeau
 
Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !
Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !
Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !Publicis Sapient Engineering
 
GitHub - Présentation
GitHub - PrésentationGitHub - Présentation
GitHub - PrésentationDavid RIEHL
 
Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?
Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?
Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?Membré Guillaume
 
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinLudovic Piot
 
What's Next Replay - IC / Jenkins
What's Next Replay - IC / JenkinsWhat's Next Replay - IC / Jenkins
What's Next Replay - IC / JenkinsZenikaOuest
 
Formation GIT gratuite par ippon 2014
Formation GIT gratuite par ippon 2014Formation GIT gratuite par ippon 2014
Formation GIT gratuite par ippon 2014Ippon
 
Atelier Git + GitHub
Atelier Git + GitHubAtelier Git + GitHub
Atelier Git + GitHubspamaert
 
OpenShift en production - Akram Ben Assi & Eloïse Faure
OpenShift en production - Akram Ben Assi & Eloïse FaureOpenShift en production - Akram Ben Assi & Eloïse Faure
OpenShift en production - Akram Ben Assi & Eloïse FaureParis Container Day
 
Jenkins - Les jeudis de la découverte
Jenkins - Les jeudis de la découverteJenkins - Les jeudis de la découverte
Jenkins - Les jeudis de la découverteStephane Couzinier
 

La actualidad más candente (20)

Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
 
Devoxx France : GruntJs In Action
Devoxx France : GruntJs In ActionDevoxx France : GruntJs In Action
Devoxx France : GruntJs In Action
 
NightClazz Docker Découverte
NightClazz Docker Découverte NightClazz Docker Découverte
NightClazz Docker Découverte
 
Jenkins Workflow
Jenkins WorkflowJenkins Workflow
Jenkins Workflow
 
Gérer son environnement de développement avec Docker
Gérer son environnement de développement avec DockerGérer son environnement de développement avec Docker
Gérer son environnement de développement avec Docker
 
Varnish & blue/green deployments
Varnish & blue/green deploymentsVarnish & blue/green deployments
Varnish & blue/green deployments
 
Migrer de Jenkins vers Azure DevOps les Builds Java
Migrer de Jenkins vers Azure DevOps les Builds JavaMigrer de Jenkins vers Azure DevOps les Builds Java
Migrer de Jenkins vers Azure DevOps les Builds Java
 
Cedric leblond migrer jenkins AWS vers Azure Devops
Cedric leblond migrer jenkins AWS vers Azure DevopsCedric leblond migrer jenkins AWS vers Azure Devops
Cedric leblond migrer jenkins AWS vers Azure Devops
 
Gulp fiction, Builder, tester, livrer, sans tomber dans les poms - breizhcam...
Gulp fiction, Builder, tester, livrer, sans tomber dans les poms  - breizhcam...Gulp fiction, Builder, tester, livrer, sans tomber dans les poms  - breizhcam...
Gulp fiction, Builder, tester, livrer, sans tomber dans les poms - breizhcam...
 
Distribuer une application avec Symfony & Docker *
Distribuer une application avec Symfony & Docker *Distribuer une application avec Symfony & Docker *
Distribuer une application avec Symfony & Docker *
 
Docker le buzz est il justifié ?
Docker le buzz est il justifié ? Docker le buzz est il justifié ?
Docker le buzz est il justifié ?
 
Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !
Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !
Devoxx France : Kubernetes University, Cap sur l’orchestration Docker !
 
GitHub - Présentation
GitHub - PrésentationGitHub - Présentation
GitHub - Présentation
 
Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?
Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?
Une caméra 📹 en DIY sur une mangeoire d'oiseau 🐦 au milieu d’un jardin 🌳 ?
 
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
 
What's Next Replay - IC / Jenkins
What's Next Replay - IC / JenkinsWhat's Next Replay - IC / Jenkins
What's Next Replay - IC / Jenkins
 
Formation GIT gratuite par ippon 2014
Formation GIT gratuite par ippon 2014Formation GIT gratuite par ippon 2014
Formation GIT gratuite par ippon 2014
 
Atelier Git + GitHub
Atelier Git + GitHubAtelier Git + GitHub
Atelier Git + GitHub
 
OpenShift en production - Akram Ben Assi & Eloïse Faure
OpenShift en production - Akram Ben Assi & Eloïse FaureOpenShift en production - Akram Ben Assi & Eloïse Faure
OpenShift en production - Akram Ben Assi & Eloïse Faure
 
Jenkins - Les jeudis de la découverte
Jenkins - Les jeudis de la découverteJenkins - Les jeudis de la découverte
Jenkins - Les jeudis de la découverte
 

Similar a Docker, ça mange quoi au printemps

Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide
 
Docker Tours Meetup #1 - Introduction à Docker
Docker Tours Meetup #1 - Introduction à DockerDocker Tours Meetup #1 - Introduction à Docker
Docker Tours Meetup #1 - Introduction à DockerThibaut Marmin
 
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...AbdellahELMAMOUN
 
Docker, mais qu’est-ce que c’est ?
Docker, mais qu’est-ce que c’est ?Docker, mais qu’est-ce que c’est ?
Docker, mais qu’est-ce que c’est ?Julien Maitrehenry
 
Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Jérôme Petazzoni
 
A la découverte de docker
A la découverte de dockerA la découverte de docker
A la découverte de dockerjean pasqualini
 
Midi technique - présentation docker
Midi technique - présentation dockerMidi technique - présentation docker
Midi technique - présentation dockerOlivier Eeckhoutte
 
Docker nice meetup #1 construire, déployer et exécuter vos applications, ...
Docker nice meetup #1   construire, déployer et exécuter vos applications, ...Docker nice meetup #1   construire, déployer et exécuter vos applications, ...
Docker nice meetup #1 construire, déployer et exécuter vos applications, ...adri1s
 
#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...
#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...
#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...Paris Open Source Summit
 
Gab17 lyon-Docker pour quoi faire - Cédric Leblond et Derue
Gab17 lyon-Docker pour quoi faire - Cédric Leblond et DerueGab17 lyon-Docker pour quoi faire - Cédric Leblond et Derue
Gab17 lyon-Docker pour quoi faire - Cédric Leblond et DerueAZUG FR
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsJulien Wittouck
 
optimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdf
optimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdfoptimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdf
optimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdfPascal Ponzoni
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et DockerStephane Manciot
 
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...Silicon Comté
 
docker-workshop-by-rbk.pdf jhuhiuguigugyug
docker-workshop-by-rbk.pdf jhuhiuguigugyugdocker-workshop-by-rbk.pdf jhuhiuguigugyug
docker-workshop-by-rbk.pdf jhuhiuguigugyugamine17157
 
Dev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuagesDev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuagesSOAT
 
Comment remplacer cygwin par docker
Comment remplacer cygwin par dockerComment remplacer cygwin par docker
Comment remplacer cygwin par dockerNicolas Trauwaen
 
Rapport openembedded
Rapport openembeddedRapport openembedded
Rapport openembeddedAyoub Rouzi
 
Virtualisation et intégration des applications d'entreprise en environnement ...
Virtualisation et intégration des applications d'entreprise en environnement ...Virtualisation et intégration des applications d'entreprise en environnement ...
Virtualisation et intégration des applications d'entreprise en environnement ...Kouotou Aboubakar Sidiki, Eng, PMP
 

Similar a Docker, ça mange quoi au printemps (20)

Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
 
Docker Tours Meetup #1 - Introduction à Docker
Docker Tours Meetup #1 - Introduction à DockerDocker Tours Meetup #1 - Introduction à Docker
Docker Tours Meetup #1 - Introduction à Docker
 
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
 
Docker, mais qu’est-ce que c’est ?
Docker, mais qu’est-ce que c’est ?Docker, mais qu’est-ce que c’est ?
Docker, mais qu’est-ce que c’est ?
 
Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Docker en Production (Docker Paris)
Docker en Production (Docker Paris)
 
A la découverte de docker
A la découverte de dockerA la découverte de docker
A la découverte de docker
 
Midi technique - présentation docker
Midi technique - présentation dockerMidi technique - présentation docker
Midi technique - présentation docker
 
Docker - YaJUG
Docker  - YaJUGDocker  - YaJUG
Docker - YaJUG
 
Docker nice meetup #1 construire, déployer et exécuter vos applications, ...
Docker nice meetup #1   construire, déployer et exécuter vos applications, ...Docker nice meetup #1   construire, déployer et exécuter vos applications, ...
Docker nice meetup #1 construire, déployer et exécuter vos applications, ...
 
#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...
#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...
#OSSPARIS17 - Docker Under the Hood : Networking & Loadbalancing & security m...
 
Gab17 lyon-Docker pour quoi faire - Cédric Leblond et Derue
Gab17 lyon-Docker pour quoi faire - Cédric Leblond et DerueGab17 lyon-Docker pour quoi faire - Cédric Leblond et Derue
Gab17 lyon-Docker pour quoi faire - Cédric Leblond et Derue
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'ts
 
optimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdf
optimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdfoptimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdf
optimadata.nl-Comment exécuter Postgres sur Docker partie 1.pdf
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et Docker
 
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
 
docker-workshop-by-rbk.pdf jhuhiuguigugyug
docker-workshop-by-rbk.pdf jhuhiuguigugyugdocker-workshop-by-rbk.pdf jhuhiuguigugyug
docker-workshop-by-rbk.pdf jhuhiuguigugyug
 
Dev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuagesDev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuages
 
Comment remplacer cygwin par docker
Comment remplacer cygwin par dockerComment remplacer cygwin par docker
Comment remplacer cygwin par docker
 
Rapport openembedded
Rapport openembeddedRapport openembedded
Rapport openembedded
 
Virtualisation et intégration des applications d'entreprise en environnement ...
Virtualisation et intégration des applications d'entreprise en environnement ...Virtualisation et intégration des applications d'entreprise en environnement ...
Virtualisation et intégration des applications d'entreprise en environnement ...
 

Más de Julien Maitrehenry

A la découverte de kubernetes
A la découverte de kubernetesA la découverte de kubernetes
A la découverte de kubernetesJulien Maitrehenry
 
Comment maitriser git et produire de beaux commits
Comment maitriser git et produire de beaux commitsComment maitriser git et produire de beaux commits
Comment maitriser git et produire de beaux commitsJulien Maitrehenry
 
Global Azure Bootcamp Québec - Container on Azure
Global Azure Bootcamp Québec - Container on AzureGlobal Azure Bootcamp Québec - Container on Azure
Global Azure Bootcamp Québec - Container on AzureJulien Maitrehenry
 
Build a Docker Swarm cluster on Azure
Build a Docker Swarm cluster on Azure Build a Docker Swarm cluster on Azure
Build a Docker Swarm cluster on Azure Julien Maitrehenry
 
Retour d'expérience sur notre stack de log
Retour d'expérience sur notre stack de logRetour d'expérience sur notre stack de log
Retour d'expérience sur notre stack de logJulien Maitrehenry
 
Sécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbot
Sécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbotSécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbot
Sécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbotJulien Maitrehenry
 
Fullstack monitoring - Overview
Fullstack monitoring - OverviewFullstack monitoring - Overview
Fullstack monitoring - OverviewJulien Maitrehenry
 
Docker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateDocker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateJulien Maitrehenry
 

Más de Julien Maitrehenry (10)

A la découverte de kubernetes
A la découverte de kubernetesA la découverte de kubernetes
A la découverte de kubernetes
 
Comment maitriser git et produire de beaux commits
Comment maitriser git et produire de beaux commitsComment maitriser git et produire de beaux commits
Comment maitriser git et produire de beaux commits
 
Docker, but what it is?
Docker, but what it is?Docker, but what it is?
Docker, but what it is?
 
Global Azure Bootcamp Québec - Container on Azure
Global Azure Bootcamp Québec - Container on AzureGlobal Azure Bootcamp Québec - Container on Azure
Global Azure Bootcamp Québec - Container on Azure
 
Build a Docker Swarm cluster on Azure
Build a Docker Swarm cluster on Azure Build a Docker Swarm cluster on Azure
Build a Docker Swarm cluster on Azure
 
Retour d'expérience sur notre stack de log
Retour d'expérience sur notre stack de logRetour d'expérience sur notre stack de log
Retour d'expérience sur notre stack de log
 
Sécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbot
Sécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbotSécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbot
Sécuriser Docker - Utilisation du CIS Docker 1.12 by @guytalbot
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Fullstack monitoring - Overview
Fullstack monitoring - OverviewFullstack monitoring - Overview
Fullstack monitoring - Overview
 
Docker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateDocker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-template
 

Docker, ça mange quoi au printemps

  • 1. DOCKER, ÇA MANGE QUOI AU PRINTEMPS ? Introduction à Docker et son écosystème
  • 2. QUI SUIS-JE ? Julien Maitrehenry DevOps at PetalMD jmaitrehenry.ca
 https://github.com/jmaitrehenry
 @jmaitrehenry
  • 5. AGENDA ▸ Le problème initial ▸ Mais qu’est-ce que Docker ?
  • 6. AGENDA ▸ Le problème initial ▸ Mais qu’est-ce que Docker ? ▸ L’écosystème
  • 7. AGENDA ▸ Le problème initial ▸ Mais qu’est-ce que Docker ? ▸ L’écosystème ▸ Quelques cas d’usage
  • 8. AGENDA ▸ Le problème initial ▸ Mais qu’est-ce que Docker ? ▸ L’écosystème ▸ Quelques cas d’usage ▸ Démo
  • 10. LE PROBLÈME - QUOI QUI VA OÙ ?
  • 11. LE PROBLÈME - LA MATRICE DE LA MORT
  • 12. LE PROBLÈME DU TRANSPORT PRE-1960
  • 13. LE PROBLÈME - UNE AUTRE MATRICE
  • 14. LA SOLUTION - LE CONTENEUR
  • 15. LE SOLUTION - LE CONTAINER DOCKER
  • 17. QU’EST-CE DOCKER ? On est là pour ça après tout !
  • 18. QU’EST-CE DOCKER ? Docker est la principale plateforme pour les conteneurs Développeurs Utilise Docker pour éliminer le problème du “ça marche sur mon poste” Admin Système Utilise Docker pour rouler et gérer des apps fonctionnant côte à côte dans des conteneurs isolées Entreprise Utilise Docker pour construire des pipelines agiles pour livrer de nouvelles fonctionnalités plus rapidement, plus sécuritaire, plus facilement scalable et avec une plus grande confiance
  • 19. ÉVOLUTION DE LA PLATEFORME DOCKER ▸ Un seul but ▸ Communauté des développeurs
 sous linux seulement
  • 20. ÉVOLUTION DE LA PLATEFORME DOCKER Développeurs Ops Entreprises Ecosystème Besoin d’expérimenter 
 et d’innover avec des technologies à jour Besoin d’un système prévisible pour déployer et faire tourner des apps Fait tourner des apps business critiques scalable et n’importe où Ajouter de la valeur et étendre une plateforme avec un moyen commun de monétisation
  • 21. LA PLATEFORME DOCKER Développeurs Ops Entreprises Ecosystème Une plateforme Pour les développeurs et les équipes TI Sur Linux et Windows On premise et dans le nuage Apps traditionnelles, vendeur de solution, microservices
  • 22. DOCKER COMMUNITY EDITION (CE) ET DOCKER ENTERPRISE EDITION (EE) ▸ Plateforme Docker gratuite 
 pour les Devs et Ops “do it yourself” ▸ Release mensuelle avec les dernières
 fonctionnalités pour les développeurs ▸ Release trimestrielle avec maintenance
 pour les Ops ▸ Plateforme CaaS avec un abonnement
 (inclue l’orchestration des containers, 
 la gestion et la sécurité) ▸ Support de niveau entreprise ▸ Release trimestrielle avec 1 ans de 
 support chaque incluant les patches et 
 hotfixes ▸ Technologie certifiée: Infrastructure, 
 plugins et container
  • 23. VERSIONS ET SUPPORT ▸ NEW! Les versions de Docker suit maintenant le format YY.MM ▸ `docker-engine` package n’existe plus, c’est maintenant `docker-ce` et `docker-ee`
  • 24. “C’est cool tout ça, mais c’est quoi Docker ? -Un anonyme
  • 25. QU’EST-CE QU’UN CONTENEUR ? ▸ Packaging standardisé pour les apps et leurs dépendances ▸ Isole les apps l’une de l’autre ▸ Partage le même Kernel que l’OS ▸ Fonctionne sur les principales distributions Linux ▸ Natif dans Windows Server 2016
  • 26. LA DIFFÉRENCE ENTRE UN CONTENEUR ET UNE VM Un conteneur est un élément au niveau applicatif Une VM est un élément au niveau 
 de l’infrastructure
  • 27. CONTENEURS ET VMS ENSEMBLE L’utilisation des conteneurs et des VMs permet une plus grande flexibilité
 pour déployer et gérer des apps de manière optimale
  • 28. “Mais en plus concret, c’est quoi un container ? -Un autre anonyme
  • 29. C’EST UNE IMAGE AVEC UN LAYER EN R/W
  • 30. “Heu… une image ? Un layer ? -Le même anonyme
  • 31. IMAGE ▸ Une image est une référence à une liste de layer en “read only” ▸ Les layers sont stacké l’un au dessus de l’autre pour former le filesystem ▸ Chaque layers peuvent être utilisé par plusieurs images ▸ Le driver de stockage de Docker est responsable de stacké les images et de fournir une vue unifié
  • 32. CONSTRUIRE UNE IMAGE FROM mhart/alpine-node:6 ENV SERVICE_3000_NAME selfpro WORKDIR /src ADD . . RUN apk add --update --no-cache git && 
 npm install EXPOSE 3000 CMD npm start Dockerfile
  • 34. CONSTRUIRE UNE IMAGE ~/work/selfpro  docker build -t petalmd/selfpro -f docker/Dockerfile .
  • 35. CONSTRUIRE UNE IMAGE ~/work/selfpro  docker build -t petalmd/selfpro -f docker/Dockerfile . Sending build context to Docker daemon 1.398 MB Step 1 : FROM mhart/alpine-node:6 ---> 2e8721f40082 Step 2 : ENV SERVICE_3000_NAME selfpro ---> Running in cd8e6156fbec ---> 9d9b1f86a696 Removing intermediate container cd8e6156fbec [...] Step 7 : CMD npm start ---> Running in 71bab8276b39 ---> cce4c583c3a0 Removing intermediate container 71bab8276b39 Successfully built cce4c583c3a0
  • 37. CONSTRUIRE UNE IMAGE ~/work/selfpro  docker history cce4c583c3a0
  • 38. CONSTRUIRE UNE IMAGE ~/work/selfpro  docker history cce4c583c3a0 IMAGE CREATED CREATED BY SIZE cce4c583c3a0 2 minutes ago /bin/sh -c #(nop) CMD ["/bin/sh" "-c" "npm s 0 B 110c49285fe1 2 minutes ago /bin/sh -c #(nop) EXPOSE 3000/tcp 0 B 579469b24848 2 minutes ago /bin/sh -c apk add --update --no-cache git && 54.16 MB 5b34c5ef9a7f 3 minutes ago /bin/sh -c #(nop) %s %s in %s ADD dir:b07dd1 1.044 MB 6ba4a61f509a 3 minutes ago /bin/sh -c #(nop) WORKDIR /src 0 B 9d9b1f86a696 3 minutes ago /bin/sh -c #(nop) ENV SERVICE_3000_NAME=self 0 B 2e8721f40082 3 weeks ago /bin/sh -c apk add --no-cache curl make gcc g 41.44 MB <missing> 3 weeks ago /bin/sh -c #(nop) ENV VERSION=v6.2.1 NPM_VERS 0 B <missing> 3 weeks ago /bin/sh -c #(nop) ADD file:701fd33a2f463fd4bd 4.799 MB
  • 39. CONSTRUIRE UNE IMAGE ~/work/selfpro  docker history cce4c583c3a0 IMAGE CREATED CREATED BY SIZE cce4c583c3a0 2 minutes ago /bin/sh -c #(nop) CMD ["/bin/sh" "-c" "npm s 0 B 110c49285fe1 2 minutes ago /bin/sh -c #(nop) EXPOSE 3000/tcp 0 B 579469b24848 2 minutes ago /bin/sh -c apk add --update --no-cache git && 54.16 MB 5b34c5ef9a7f 3 minutes ago /bin/sh -c #(nop) %s %s in %s ADD dir:b07dd1 1.044 MB 6ba4a61f509a 3 minutes ago /bin/sh -c #(nop) WORKDIR /src 0 B 9d9b1f86a696 3 minutes ago /bin/sh -c #(nop) ENV SERVICE_3000_NAME=self 0 B 2e8721f40082 3 weeks ago /bin/sh -c apk add --no-cache curl make gcc g 41.44 MB <missing> 3 weeks ago /bin/sh -c #(nop) ENV VERSION=v6.2.1 NPM_VERS 0 B <missing> 3 weeks ago /bin/sh -c #(nop) ADD file:701fd33a2f463fd4bd 4.799 MB ~/work/selfpro  docker history petalmd/selfpro
  • 40. AVANTAGES DES IMAGES ▸ Chaque layers peuvent être utilisé par plusieurs images ▸ Une image peut être construite au dessus d’une autre image ▸ Un site static peut être construit par dessus l’image de nginx, qui peut, elle même être construit par dessus alpine Linux ▸ Construire une image peut se résumer à juste reconstruire le dernier layer
  • 41. EXEMPLE D’IMAGE /bin/sh -c #(nop) ADD file:614a9122187935fccf 4.797 MB addgroup -S redis && adduser -S -G […] apk add --no-cache ‘su-exec>=0.2' […] ENV REDIS_VERSION=3.2.1 CMD ["redis-server"] [9 other layers] MAINTAINER NGINX Docker Maintainers ENV NGINX_VERSION=1.11.1 EXPOSE 443/tcp 80/tcp CMD ["nginx" "-g" "daemon off;”] 0 B [5 other layers] alpine:3.3 redis:alpine nginx:alpine
  • 43. DOCKER ENGINE ▸ Client-Server application qui permet: ▸ Gérer des images ▸ Gérer des conteneurs ▸ Gérer des réseaux ▸ Gérer des volumes ▸ Possède une API REST et un CLI
  • 44. DOCKER COMPOSE ▸ Définie une application multi- containers utilisants plusieurs dépendances dans un seul fichier ▸ Contient la structure et la configuration en une place ▸ Démarre (ou arrête) une application en une seul command
  • 48. DEMO
  • 49. DEMO ~/work/wordpress  docker-compose up -d Creating network "wordpress_default" with the default driver Creating volume "wordpress_db_data" with default driver Creating wordpress_mysql_1 Creating wordpress_wordpress_1
  • 50. DEMO ~/work/wordpress  docker-compose up -d Creating network "wordpress_default" with the default driver Creating volume "wordpress_db_data" with default driver Creating wordpress_mysql_1 Creating wordpress_wordpress_1 ~/work/wordpress  docker-compose ps Name Command State Ports ------------------------------------------------------------------------------------- wordpress_mysql_1 docker-entrypoint.sh mysqld Up 3306/tcp wordpress_wordpress_1 docker-entrypoint.sh apach ... Up 0.0.0.0:8080->80/tcp
  • 51. DEMO ~/work/wordpress  docker-compose up -d Creating network "wordpress_default" with the default driver Creating volume "wordpress_db_data" with default driver Creating wordpress_mysql_1 Creating wordpress_wordpress_1 ~/work/wordpress  docker-compose ps Name Command State Ports ------------------------------------------------------------------------------------- wordpress_mysql_1 docker-entrypoint.sh mysqld Up 3306/tcp wordpress_wordpress_1 docker-entrypoint.sh apach ... Up 0.0.0.0:8080->80/tcp
  • 52. DOCKER REGISTRY ▸ Stock et distribue les images Docker ▸ De nombreux Registry hébergés disponibles: ▸ Docker Hub, AWS ECR, … ▸ Peut être self-hosted avec plusieurs intégrations pour le stockage: ▸ Local, AWS S3, Ceph, OpenStack Swift, …
  • 53. DOCKER MACHINE ▸ Provisionne et configure Docker sur un serveur distant ▸ Fonctionne avec la plus part des cloud providers ▸ AWS / GCE / Azure / DO / IBM ▸ Fonctionne aussi avec des technologies standards ▸ OpenStack / vCenter
  • 55. DOCKER MACHINE ~/work  docker-machine create --driver digitalocean --digitalocean-size 1gb --digitalocean-region tor1 --digitalocean-access-token xxx
  • 56. DOCKER MACHINE Running pre-create checks... Creating machine... (swarm1) Creating SSH key... (swarm1) Creating Digital Ocean droplet... (swarm1) Waiting for IP address to be assigned to the Droplet... Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with ubuntu(systemd)... Installing Docker...
  • 57. DOCKER MACHINE Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm1
  • 58. DOCKER MACHINE Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm1 ~/work  eval $(docker-machine env swarm1)
  • 59. DOCKER MACHINE Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm1 ~/work  eval $(docker-machine env swarm1) ~/work  docker info
  • 60. DOCKER MACHINE Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm1 ~/work  eval $(docker-machine env swarm1) ~/work  docker info CPUs: 1 Total Memory: 992.4MiB Name: swarm1 Labels: provider=digitalocean
  • 61. DOCKER SWARM ▸ Transforme un groupe de serveurs docker en un cluster ▸ Gestion du cluster inclue dans le Docker Engine ▸ Décentralisé ▸ Declarative service model ▸ Scaling ▸ Secure by default ▸ Service discovery ▸ Multi-host networking ▸ Rolling Update
  • 63. DOCKER SWARM ~/work  docker swarm init --advertise-addr 138.197.149.25
  • 64. DOCKER SWARM ~/work  docker swarm init --advertise-addr 138.197.149.25 Swarm initialized: current node (fymao87flfrbkstg7gyzdx4ov) is now a manager. To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 138.197.149.25:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
  • 66. DOCKER SWARM ~/work  docker swarm join --token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 138.197.149.25:2377
  • 67. DOCKER SWARM ~/work  docker swarm join --token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 138.197.149.25:2377 This node joined a swarm as a worker.
  • 68. DOCKER SWARM ~/work  docker swarm join --token SWMTKN-1-0vy0ta7rz8t1sblq3o63s83nvnhy7ddxyczp4w50hs9dipbpg6-xx 138.197.149.25:2377 This node joined a swarm as a worker. ~/work  docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS c2lyl7ail0r68c141zidbovpl swarm2 Ready Active fymao87flfrbkstg7gyzdx4ov * swarm1 Ready Active Leader
  • 69. DOCKER CLOUD ▸ Solution commerciale de Docker pour faire des pipelines de CI / CD ▸ Se hook sur Github et Bitbucket pour construire des images et les déployer automatiquement ▸ Utilise nos serveurs ou se branche sur des cloud providers ▸ Facturation par node par heure
  • 70. USE CASE Mais comment ça peut m’être utile ?
  • 72. CONTINUOUS INTEGRATION Jenkins Master Jenkins Slave Docker Registry • Jenkins in Docker • Auto provisionning • Only docker running on host • Jenkins agent running in Docker • For storing Docker image • Private or public • On promise or not
  • 73. CI / CD If the test is successful, 
 the image is pushed to the 
 Registry
  • 74. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 75. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 76. STAGING AUTO DEPLOYING WITH WORDPRESS ▸ Construire une nouvelle version à chaque git push
  • 77. STAGING AUTO DEPLOYING WITH WORDPRESS ▸ Construire une nouvelle version à chaque git push ▸ Construire une image pour Wordpress et une autre pour MySQL
  • 78. STAGING AUTO DEPLOYING WITH WORDPRESS ▸ Construire une nouvelle version à chaque git push ▸ Construire une image pour Wordpress et une autre pour MySQL ▸ Déployer automatiquement à chaque build
  • 79. STAGING AUTO DEPLOYING WITH WORDPRESS ▸ Construire une nouvelle version à chaque git push ▸ Construire une image pour Wordpress et une autre pour MySQL ▸ Déployer automatiquement à chaque build ▸ Avoir une URL utilisable
  • 80. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 81. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 82. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 83. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 84. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 85. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 86. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 87. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 88. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 89. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 90. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 91. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 92. STAGING AUTO DEPLOYING WITH WORDPRESS
  • 94. RESSOURCES ▸ Labs en ligne: https://training.docker.com/self-paced-online
  • 95. RESSOURCES ▸ Labs en ligne: https://training.docker.com/self-paced-online ▸ Utiliser docker en ligne: http://play-with-docker.com
  • 96. RESSOURCES ▸ Labs en ligne: https://training.docker.com/self-paced-online ▸ Utiliser docker en ligne: http://play-with-docker.com ▸ Communauté et channel slack: https://www.docker.com/ docker-community
  • 97. RESSOURCES ▸ Labs en ligne: https://training.docker.com/self-paced-online ▸ Utiliser docker en ligne: http://play-with-docker.com ▸ Communauté et channel slack: https://www.docker.com/ docker-community ▸ Docker Meetup Québec: https://www.meetup.com/fr-FR/ Docker-Quebec-Meetup/
  • 98. RESSOURCES ▸ Labs en ligne: https://training.docker.com/self-paced-online ▸ Utiliser docker en ligne: http://play-with-docker.com ▸ Communauté et channel slack: https://www.docker.com/ docker-community ▸ Docker Meetup Québec: https://www.meetup.com/fr-FR/ Docker-Quebec-Meetup/ ▸ Docker Meetup Montréal: https://www.meetup.com/fr-FR/ Docker-Montreal/
  • 99. DÉMO