Running plain Docker Compose in production in 2026: what breaks and how to close the gaps
A practical field guide argues Docker Compose can still run production workloads—if teams explicitly handle operational gaps like orphan containers, disk/log growth, healthcheck behavior, and mutable tags. The post outlines concrete commands and guardrails for safer single-host deployments.
Docker Compose remains a popular way to deploy multi-container apps on a single host, but it doesn’t provide the always-on reconciliation and self-healing that operators may expect from orchestrators like Kubernetes. A detailed 2026 guide from Distr’s Philip breaks down common ‘Compose in production’ failure modes and the habits that prevent 2 a.m. outages.
Key operational lessons highlighted in the article include:
1) Orphan containers linger unless you remove them. If services are removed from docker-compose.yaml, old containers can keep running and consuming resources. The recommended fix is consistently using `docker compose up -d --remove-orphans`.
2) Disk fills up from images and logs. Compose pulls new image versions and keeps old layers around, while default json-file logs can grow without bounds. The post recommends regularly auditing with `docker system df -v`, pruning unused images, and setting log rotation defaults in /etc/docker/daemon.json.
3) Health checks don’t auto-restart unhealthy containers. Docker reports ‘unhealthy’ status but won’t restart a container unless it exits. Solutions include an autoheal sidecar, moving to Swarm, or bundling remediation logic via an agent.
4) Tags are not contracts. Mutable tags (especially :latest) can create drift across hosts. Pinning images by digest (e.g., `myapp@sha256:...`) improves reproducibility and makes unexpected changes loud.
5) Docker socket mounts are effectively root. Any container that can talk to /var/run/docker.sock can potentially get host-level control; the post encourages inventorying socket mounts and considering rootless Docker or socket proxies.
Why it matters for web development teams: many internal tools, side projects, and edge deployments don’t justify Kubernetes, so Compose often becomes the default ‘production’ platform. The guide is a useful checklist to turn that default into a deliberately operated system with predictable failure modes, clearer rollback paths, and better security posture.
Source: Distr Blog