intro to docker
TRANSCRIPT
![Page 1: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/1.jpg)
Intro to Docker-Abderrahmane Mechri-
![Page 2: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/2.jpg)
2
Quel est le problème ?
• Beaucoup d’environements• Beaucoup de dépendances• Beaucoup de librairies ÞSolution: les machines virtuelles • Une taille très grande• Une perte dans les ressources
![Page 3: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/3.jpg)
3
Objectif ?
Automatiser le déploiement d'environnements sous
forme légère, portables et auto-suffisants
![Page 4: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/4.jpg)
4
La solution ?
![Page 5: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/5.jpg)
5
Conteneurs ? • LXC• Pas de dépendances• Isolation
![Page 6: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/6.jpg)
6
Avantages • Scalable • Portable• Meilleurs performances• Déploiement
![Page 7: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/7.jpg)
7
Pourquoi docker ?
![Page 8: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/8.jpg)
8
« Docker est un outil qui peut empaqueter une application et ses dépendances dans un conteneur
virtuel , qui pourra être exécuter sur n’importe quel serveur»
![Page 9: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/9.jpg)
9
Conteneurs VS Vm
![Page 10: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/10.jpg)
10
Conteneurs VS Vm
![Page 11: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/11.jpg)
11
Comment ça marche • Docker Daemon• Docker Client• Boot2Docker
![Page 12: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/12.jpg)
12
Installation de docker sur ubuntu• sudo apt-get update• sudo apt-get install curl \ linux-image-extra-$(uname -r) \ linux-image-extra-virtual• sudo apt-get install apt-transport-https \ ca-certificates• curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add –• apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D• sudo add-apt-repository \ "deb https://apt.dockerproject.org/repo/ \ ubuntu-$
(lsb_release -cs) \ main" • sudo apt-get update• sudo apt-get -y install docker-engine• sudo docker run hello-world
![Page 13: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/13.jpg)
13
Terminologie• index : répertoire public (Dépôt des images)• image : snapshot• conteneur : élément manipulable
![Page 14: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/14.jpg)
14
Docker hubDépôt des images
![Page 15: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/15.jpg)
15
Commande searchRechercher une image:
![Page 16: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/16.jpg)
16
Commande pullRécupération d’une image:
![Page 17: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/17.jpg)
17
Commande imagesLister les images :
![Page 18: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/18.jpg)
18
Commande runLancement d’un container
![Page 19: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/19.jpg)
19
Commande psLister les conteneurs lancés :
![Page 20: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/20.jpg)
20
Commande stop• Arrêter un conteneur :
![Page 21: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/21.jpg)
21
Port mapping Associer un port du conteneur avec un port de la machine hôte :
![Page 22: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/22.jpg)
22
Commande diff• La différence entre l'image et le conteneur :
![Page 23: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/23.jpg)
23
Commande commit• Enregistre la différence entre l'image et le conteneur :
![Page 24: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/24.jpg)
24
Commande pushPusher une image vers le Hub
![Page 25: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/25.jpg)
25
Commande import / export
![Page 26: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/26.jpg)
26
Client docker• Python (docker-py)• Ruby (docker-client, docker-api)• Javascript (docker.io, docker-js, dockerui)• Java (docker-java)
![Page 27: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/27.jpg)
27
Client docker
![Page 28: Intro to docker](https://reader035.vdocuments.pub/reader035/viewer/2022062401/5899f7781a28abc5778b5455/html5/thumbnails/28.jpg)
28
Merci pour votre attention