Should I Run Plain Docker Compose in Production in 2026?
- Viability: Plain Docker Compose remains a viable option for production workloads in 2026, especially for single-node deployments, edge computing, or internal services that don't require the complexity of Kubernetes.
- Addressing Operational Gaps: Success depends on manually closing gaps that Compose leaves open:
- Orphan Containers: Use the
--remove-orphansflag duringupanddowncommands to ensure containers removed from the YAML file are actually stopped and cleared. - Disk Management:
- Implement log rotation in
daemon.json(e.g.,max-size: 10m) to prevent unbounded log files from filling disks. - Establish a schedule for pruning unused images and build caches (
docker image prune). - Exercise caution with
docker volume pruneto avoid accidental data loss from detached volumes.
- Implement log rotation in
- Health Checks: Native Docker health checks only report status; they do not automatically restart containers. Use a sidecar like
docker-autohealor a dedicated agent to act on "unhealthy" states. - Image Pinning: Avoid using mutable tags like
:latest. Instead, pin images using their immutable SHA256 digests (image: myapp@sha256:...) to ensure consistency across different host pulls.
- Orphan Containers: Use the
- Security Risks: Mounting
/var/run/docker.sockprovides a container with effective root privileges on the host. Minimize its use, consider rootless Docker, or use a socket proxy to limit API exposure. - Scaling Updates: For managing multiple environments, tools like Watchtower (polling) or pull-based agents are necessary, as Docker has no native mechanism to "push" updates to remote Compose hosts.
- Growth Path: When requirements outgrow a single node, Kubernetes is the industry standard for migration. Docker Swarm is an alternative that reuses Compose syntax but has a smaller ecosystem.








and one more:

