Archived
Update presentation
This commit is contained in:
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 28 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 83 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 64 KiB |
+65
-38
@@ -1,3 +1,8 @@
|
||||
## Simplifiez vos déploiement avec la conteneurisation
|
||||
Nathan Tien You
|
||||
|
||||
---
|
||||
|
||||
## Sommaire
|
||||
- Introduction à la conteneurisation
|
||||
- Docker
|
||||
@@ -30,6 +35,22 @@
|
||||
|
||||
---
|
||||
|
||||
## Infrastructure as code
|
||||
- Automatisation
|
||||
- Fiabilité
|
||||
- Efficacité
|
||||
- Contrôle des versions
|
||||
- Autodocumenté
|
||||
- Immutabilité
|
||||
|
||||
---
|
||||
|
||||
## Virtualisation du service
|
||||
\
|
||||
<sup>source : [Gitlab](https://gitlab.com)</sup>
|
||||
|
||||
---
|
||||
|
||||
## Différents types de conteneurisation
|
||||
- Conteneurs Processus
|
||||
- Docker
|
||||
@@ -40,48 +61,38 @@
|
||||
|
||||
---
|
||||
|
||||
## Virtualisation du service
|
||||
\
|
||||
<sup>source : [Gitlab](https://gitlab.com)</sup>
|
||||
|
||||
---
|
||||
|
||||
## Infrastructure as code
|
||||
- Automatisation
|
||||
- Fiabilité
|
||||
- Efficacité
|
||||
- Contrôle des versions
|
||||
- Code = Infrastructre : autodocumenté
|
||||
- Immutabilité
|
||||
|
||||
---
|
||||
|
||||
## Conteneurs
|
||||
<ul>
|
||||
<li>Ressources (processeur, ram)</li>
|
||||
<li>Stockage</li>
|
||||
<li>Réseau</li>
|
||||
</ul>
|
||||
<object data-id="Container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
||||
<!-- .slide: data-auto-animate -->
|
||||
Contexte d'éxecution isolé : chroot
|
||||
|
||||
----
|
||||
<object data-id="chroot.svg" data="./assets/chroot.svg" type="image/svg+xml"></object>
|
||||
|
||||
```bash [1-5|1-2|3|4|5]
|
||||
---
|
||||
|
||||
## Base du conteneur : image
|
||||
|
||||
<object data-id="image.svg" data="./assets/image.svg" type="image/svg+xml"></object>
|
||||
|
||||
- Point d'entrée (exécutable)
|
||||
- Variables d'environnement
|
||||
- Ports
|
||||
|
||||
---
|
||||
|
||||
## Registres d'images
|
||||

|
||||
---
|
||||
|
||||
## Lancement d'un conteneur
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-it --rm \
|
||||
-v /tmp:/usr/local/apache2/htdocs/ \
|
||||
-p 8000:80 \
|
||||
httpd:latest
|
||||
```
|
||||
<object data-id="Container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
||||
<!-- .slide: data-auto-animate -->
|
||||
|
||||
----
|
||||
|
||||

|
||||
<object data-id="Container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
||||
<!-- .slide: data-auto-animate -->
|
||||
<object data-id="container.svg" data="./assets/Container.drawio.svg" type="image/svg+xml"></object>
|
||||
|
||||
----
|
||||
|
||||
@@ -89,11 +100,27 @@ httpd:latest
|
||||
|
||||
---
|
||||
|
||||
## Images
|
||||
```Docker
|
||||
FROM httpd:alpine
|
||||
## Bonnes pratiques Docker
|
||||
- Conteneurs éphémères
|
||||
- Processus stateless
|
||||
- Architecture Shared-nothing
|
||||
- Images minimales
|
||||
- Installer uniquement le nécessaire
|
||||
- Séparer compilation et mise en production
|
||||
|
||||
COPY files/* /usr/local/apache2/htdocs/
|
||||
---
|
||||
|
||||
## Construction d'une image
|
||||
```Docker dockercompose
|
||||
FROM node:lts-alpine3.20
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
COPY index.js ./
|
||||
RUN npm ci
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
```
|
||||

|
||||
```bash
|
||||
@@ -121,7 +148,7 @@ docker buildx build . -t demo:latest
|
||||
|
||||
----
|
||||
|
||||
```yaml [|1-4,11-13,22-23|5-6,14-15,36-37|8-9,18-19,28-30,32-34|7,16-17,24-25,26-27] dockercompose
|
||||
```yaml [|1-4,11-13,21-23|5-6,14-15,36-37|8-9,18-19,28-30,32-34|7,16-17,24-25,26-27] dockercompose
|
||||
services:
|
||||
|
||||
database:
|
||||
@@ -167,7 +194,7 @@ volumes:
|
||||
- Clusters
|
||||
- Stockage distribué
|
||||
- Haute Disponibilité
|
||||
- Redonance
|
||||
- Redondance
|
||||
- Stratégie de déploiement
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user