Académique Documents
Professionnel Documents
Culture Documents
1. Notion de Conteneur
Avantages :
Vérification de l'installation :
Docker --version
3. Création de Conteneurs
services:
lamp:
image: php:apache
ports:
- "80:80"
volumes:
- ./lamp:/var/www/html
mysql:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: your_root_password
MYSQL_DATABASE: your_database
MYSQL_USER: your_username
MYSQL_PASSWORD: your_password
python:
image: python:latest
ports:
- "8000:8000"
volumes:
- ./python:/app
command: python -m http.server 8000
che:
image: eclipse/che
ports:
- "8080:8080"
gns3:
image: gns3/gns3-server
privileged: true
network_mode: host
volumes:
- /tmp/gns3:/tmp/gns3
- /var/run/docker.sock:/var/run/docker.sock