Skip to main content
Settings
Color Mode
Theme Skin
Background

Appearance preferences are saved in this browser only.

Environment
Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links
Theme & Build
Jekyll v3.10.0
Last Build Aug 05, 04:35
Page Location
Page Info
Layout default
Collection none
Path fr/docs/docker/index.md
URL /fr/docs/docker/
This page was translated automatically from the English original. View the original

Docker

Workflow Docker-first pour développer et tester Zer0-Mistakes.

Développement avec Docker

Zer0-Mistakes utilise une approche Docker-first pour un développement cohérent sur toutes les plateformes.

Commandes essentielles

Démarrer le développement

# Start development server (foreground, see logs)
docker-compose up

# Start in background (detached mode)
docker-compose up -d

# View logs when running in background
docker-compose logs -f jekyll

Votre site sera accessible à l’adresse http://localhost:4000.

Arrêter le développement

# Stop containers (preserves data)
docker-compose stop

# Stop and remove containers
docker-compose down

# Stop and remove containers + volumes (clean slate)
docker-compose down -v

Reconstruction

# Rebuild after Gemfile changes
docker-compose up --build

# Force complete rebuild
docker-compose down && docker-compose up --build

Travailler à l’intérieur du conteneur

# Open a shell in the container
docker-compose exec jekyll bash

# Run Jekyll commands directly
docker-compose exec jekyll jekyll build
docker-compose exec jekyll jekyll doctor
docker-compose exec jekyll bundle update

Fichiers de configuration

Fichier Rôle
docker-compose.yml Configuration principale de développement
docker-compose.prod.yml Paramètres de build de production
docker-compose.test.yml Configuration de test

Prise en charge d’Apple Silicon (M1/M2/M3)

La configuration Docker inclut la compatibilité des plateformes :

services:
  jekyll:
    platform: linux/amd64  # Ensures compatibility

Tâches courantes

Reconstruction propre

docker-compose down -v
docker-compose up --build

Vérifier la configuration

docker-compose exec jekyll jekyll doctor

Mettre à jour les dépendances

docker-compose exec jekyll bundle update

Dépannage

Port déjà utilisé :

# Find process using port 4000
lsof -i :4000
# Kill it or use a different port
docker-compose up -p 4001:4000

Le conteneur ne démarre pas :

# Check logs for errors
docker-compose logs jekyll

# Try clean rebuild
docker-compose down -v && docker-compose up --build

Ressources associées

Voir aussi

  • [[Jekyll]]
  • [[Ruby]]
  • [[Deployment]]
  • [[Installation]]