SlideShare une entreprise Scribd logo
1  sur  100
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCKernel TLV
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
KubernetesバックアップツールVeleroとちょっとした苦労話
KubernetesバックアップツールVeleroとちょっとした苦労話KubernetesバックアップツールVeleroとちょっとした苦労話
KubernetesバックアップツールVeleroとちょっとした苦労話imurata8203
 
VPP事始め
VPP事始めVPP事始め
VPP事始めnpsg
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabTaeung Song
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHubVikram SV
 
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개OpenStack Korea Community
 
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3Ji-Woong Choi
 
Container Storage Best Practices in 2017
Container Storage Best Practices in 2017Container Storage Best Practices in 2017
Container Storage Best Practices in 2017Keith Resar
 
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...Edureka!
 
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)NTT DATA Technology & Innovation
 

Tendances (20)

Git commands
Git commandsGit commands
Git commands
 
Git flow
Git flowGit flow
Git flow
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Docker
DockerDocker
Docker
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
KubernetesバックアップツールVeleroとちょっとした苦労話
KubernetesバックアップツールVeleroとちょっとした苦労話KubernetesバックアップツールVeleroとちょっとした苦労話
KubernetesバックアップツールVeleroとちょっとした苦労話
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
VPP事始め
VPP事始めVPP事始め
VPP事始め
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLab
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
 
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
 
Container Storage Best Practices in 2017
Container Storage Best Practices in 2017Container Storage Best Practices in 2017
Container Storage Best Practices in 2017
 
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
 

Similaire à Julien Maitrehenry - 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 bassinLudovic Piot
 
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 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
 
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
 

Similaire à Julien Maitrehenry - 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
 
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 le buzz est il justifié ?
Docker le buzz est il justifié ? Docker le buzz est il justifié ?
Docker le buzz est il justifié ?
 
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
 

Plus de Web à Québec

Guillaume Labbé-Morissette
Guillaume Labbé-MorissetteGuillaume Labbé-Morissette
Guillaume Labbé-MorissetteWeb à Québec
 
Frédérick Capovilla
Frédérick CapovillaFrédérick Capovilla
Frédérick CapovillaWeb à Québec
 
Cynthia Thibault-Larouche
Cynthia Thibault-LaroucheCynthia Thibault-Larouche
Cynthia Thibault-LaroucheWeb à Québec
 
Intelligence artificielle, Données massives et Internet des objets: Quels son...
Intelligence artificielle, Données massives et Internet des objets: Quels son...Intelligence artificielle, Données massives et Internet des objets: Quels son...
Intelligence artificielle, Données massives et Internet des objets: Quels son...Web à Québec
 
So you want to be a service designer - Jamin Hegeman
So you want to be a service designer - Jamin HegemanSo you want to be a service designer - Jamin Hegeman
So you want to be a service designer - Jamin HegemanWeb à Québec
 
AI & the future of the political party - Colin Megill
AI & the future of the political party - Colin MegillAI & the future of the political party - Colin Megill
AI & the future of the political party - Colin MegillWeb à Québec
 
comment le Canada peut Gagner dans le secteur du numérique - Alex Benay
comment le Canada peut Gagner dans le secteur du numérique - Alex Benay comment le Canada peut Gagner dans le secteur du numérique - Alex Benay
comment le Canada peut Gagner dans le secteur du numérique - Alex Benay Web à Québec
 
Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...
Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...
Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...Web à Québec
 
Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...
Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...
Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...Web à Québec
 
Complexité et systèmes opérables - Fred Hébert
Complexité et systèmes opérables - Fred HébertComplexité et systèmes opérables - Fred Hébert
Complexité et systèmes opérables - Fred HébertWeb à Québec
 

Plus de Web à Québec (20)

Kevin Bélanger
Kevin BélangerKevin Bélanger
Kevin Bélanger
 
Gabriel LeBreton
Gabriel LeBretonGabriel LeBreton
Gabriel LeBreton
 
Rémi Prévost
Rémi PrévostRémi Prévost
Rémi Prévost
 
Ludivine Durand
Ludivine DurandLudivine Durand
Ludivine Durand
 
Julie Simard
Julie SimardJulie Simard
Julie Simard
 
Guillaume Labbé-Morissette
Guillaume Labbé-MorissetteGuillaume Labbé-Morissette
Guillaume Labbé-Morissette
 
Katherine Mailloux
Katherine MaillouxKatherine Mailloux
Katherine Mailloux
 
Denis Martel
Denis MartelDenis Martel
Denis Martel
 
Charles Davignon
Charles DavignonCharles Davignon
Charles Davignon
 
Frédérick Capovilla
Frédérick CapovillaFrédérick Capovilla
Frédérick Capovilla
 
Cynthia Thibault-Larouche
Cynthia Thibault-LaroucheCynthia Thibault-Larouche
Cynthia Thibault-Larouche
 
Louis-André Labadie
Louis-André LabadieLouis-André Labadie
Louis-André Labadie
 
Christophe Clouzeau
Christophe ClouzeauChristophe Clouzeau
Christophe Clouzeau
 
Intelligence artificielle, Données massives et Internet des objets: Quels son...
Intelligence artificielle, Données massives et Internet des objets: Quels son...Intelligence artificielle, Données massives et Internet des objets: Quels son...
Intelligence artificielle, Données massives et Internet des objets: Quels son...
 
So you want to be a service designer - Jamin Hegeman
So you want to be a service designer - Jamin HegemanSo you want to be a service designer - Jamin Hegeman
So you want to be a service designer - Jamin Hegeman
 
AI & the future of the political party - Colin Megill
AI & the future of the political party - Colin MegillAI & the future of the political party - Colin Megill
AI & the future of the political party - Colin Megill
 
comment le Canada peut Gagner dans le secteur du numérique - Alex Benay
comment le Canada peut Gagner dans le secteur du numérique - Alex Benay comment le Canada peut Gagner dans le secteur du numérique - Alex Benay
comment le Canada peut Gagner dans le secteur du numérique - Alex Benay
 
Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...
Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...
Rendre son équipe performante : plus simple qu'on le pense - Louis-Philippe C...
 
Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...
Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...
Turning Research Ripples Into Waves: Growing UX Research Capacity Through Col...
 
Complexité et systèmes opérables - Fred Hébert
Complexité et systèmes opérables - Fred HébertComplexité et systèmes opérables - Fred Hébert
Complexité et systèmes opérables - Fred Hébert
 

Julien Maitrehenry - 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