Docker Compose Tip #23: Multi-platform builds with platforms

Build once, run everywhere! Create images that work on ARM Macs, Intel servers, and Raspberry Pi with a single build command. Configure multi-arch builder Docker Desktop handles this by default. For other Docker installations, set up buildx: # Only needed if not using Docker Desktop # Create and use a new builder docker buildx create --name multiarch --use # Verify available platforms docker buildx ls Configure platforms Specify target architectures in your compose file: ...

February 4, 2026 · 3 min · 470 words · Guillaume Lours

Docker Compose Tip #22: Using secrets in Compose files

Stop hardcoding passwords! Docker Compose secrets provide a secure way to handle sensitive data. Basic secret setup Define secrets and use them in services: secrets: db_password: file: ./secrets/db_password.txt api_key: file: ./secrets/api_key.txt services: app: image: myapp:latest secrets: - db_password - api_key environment: DB_PASSWORD_FILE: /run/secrets/db_password API_KEY_FILE: /run/secrets/api_key Secrets appear as files in /run/secrets/ inside containers. Reading secrets in your app Node.js example: ...

February 3, 2026 · 2 min · 270 words · Guillaume Lours

Docker Compose Tip #21: Understanding bridge vs host networking modes

Choose the right networking mode for your containers. Understand when isolation matters and when performance is key. Bridge mode (default) The default and most secure option - containers get their own network namespace: services: web: image: nginx ports: - "8080:80" # Port mapping required networks: - app_network db: image: postgres:15 networks: - app_network networks: app_network: driver: bridge Containers can communicate using service names (web, db) within the network. ...

February 2, 2026 · 2 min · 330 words · Guillaume Lours

Docker Compose Tip #20: Using docker compose logs effectively

Stop scrolling through endless output. Master docker compose logs options to find issues fast and monitor services effectively. Basic commands # All service logs docker compose logs # Single service docker compose logs web # Multiple services docker compose logs web worker Follow logs in real-time Watch logs as they happen: # Follow all services docker compose logs -f # Follow specific service docker compose logs -f api # Start fresh and follow docker compose logs -f --since 1m Tail recent logs Get last N lines: ...

January 30, 2026 · 3 min · 427 words · Guillaume Lours

Docker Compose Tip #19: Override files for local development

Keep production and development configs separate. Docker Compose automatically merges compose.override.yml for local development tweaks. The magic Compose automatically loads two files: compose.yml (base configuration) compose.override.yml (local overrides) # These are equivalent: docker compose up docker compose -f compose.yml -f compose.override.yml up Basic setup compose.yml (production-ready): services: web: image: myapp:latest ports: - "80:80" environment: NODE_ENV: production LOG_LEVEL: warn compose.override.yml (developer-friendly): services: web: build: . # Build locally instead of using image ports: - "3000:80" # Different port for development volumes: - .:/app # Mount source code environment: NODE_ENV: development LOG_LEVEL: debug DEBUG: "true" Real development example compose.yml: ...

January 29, 2026 · 2 min · 348 words · Guillaume Lours