Compose, Break, Repeat

Welcome! I’m Guillaume Lours, Docker Compose maintainer, passionate about containerization and developer tools.
I’m currently Software engineer at Docker working on Compose and Docker Sandboxes.

Exploring the iterative world of software engineering, Docker, and the art of building things that sometimes break.

Docker Compose Tip #35: Using tmpfs for ephemeral storage

Speed up I/O operations and enhance security by using tmpfs for temporary data. RAM-based storage that vanishes on restart! What is tmpfs? Tmpfs is a temporary filesystem that resides in memory: ⚡ Ultra-fast (RAM speed) 🔒 Secure (data doesn’t persist) 🧹 Self-cleaning (cleared on restart) Basic tmpfs usage Simple tmpfs mount: services: app: image: myapp tmpfs: - /tmp - /app/cache - /var/run With size limits: services: app: image: myapp tmpfs: - /tmp:size=100M - /app/cache:size=500M - /var/run:size=10M Advanced tmpfs options Fine-tuned configuration: ...

March 4, 2026 · 3 min · 524 words · Guillaume Lours

Docker Compose Tip #34: Debugging with exec vs run

Know the difference between exec and run! Each has its place in your debugging toolkit. The key difference exec: Runs commands in an existing container run: Creates a new container # Exec: enters running container docker compose exec web bash # Run: starts new container docker compose run web bash When to use exec Use exec for debugging running services: # Debug a running web server docker compose exec web bash # Check logs inside container docker compose exec web tail -f /var/log/app.log # Run database queries docker compose exec db psql -U postgres # Check process list docker compose exec web ps aux # Test connectivity from inside docker compose exec web curl http://api:3000/health Important: Container must be running! ...

March 2, 2026 · 3 min · 636 words · Guillaume Lours

Docker Compose Tip #33: Using logging drivers and options

Take control of your container logs! Configure different logging drivers for better management, rotation, and analysis. Default logging: json-file By default, Docker uses the json-file driver: services: app: image: myapp logging: driver: json-file options: max-size: "10m" # Rotate after 10MB max-file: "3" # Keep 3 rotated files compress: "true" # Compress rotated files Without rotation, logs can fill your disk! Common logging drivers 1. Local driver (efficient storage) Optimized for performance and disk usage: ...

February 27, 2026 · 3 min · 536 words · Guillaume Lours

Docker Compose Tip #32: Build contexts and dockerignore patterns

Speed up builds and reduce image size by managing build contexts effectively. Don’t send unnecessary files to the Docker daemon! Understanding build context The build context is what gets sent to Docker daemon: services: app: build: . # Current directory is the context # Everything in . gets sent to daemon! Check your context size: # See what's being sent docker build --no-cache . 2>&1 | grep "Sending build context" # Output: Sending build context to Docker daemon 458.2MB 😱 Custom build contexts Specify different contexts for different services: ...

February 25, 2026 · 3 min · 433 words · Guillaume Lours

Docker Compose Tip #31: Network isolation between services

Secure your application architecture by isolating services in separate networks. Not every service needs to talk to every other service! Default behavior: All connected By default, all services share the same network: # All services can communicate services: web: image: nginx api: image: myapi database: image: postgres Problem: web can directly access database - potential security risk! Network isolation pattern Create separate networks for different tiers: ...

February 23, 2026 · 3 min · 516 words · Guillaume Lours