HACKER Q&A
📣 wg0

Is Docker-Compose Dead?


In face of the exemplary rise of k8s, is docker-compose dead for developers working on their local machines? Are people now moving towards k8s even for their development workflows? Especially the cases where to develop a feature, you have to depend on five external services so either you pull them and run locally (resource hungry although) or use staging version (not ideal) or spinning their copies on k8s instead?

In short, is docker-compose dead or will be dead forever in near to mid term future? And lastly, what is the current state of affairs?


  👤 atmosx Accepted Answer ✓
I don't think docker-compose will ever be dead, it's the easiest way to setup a local environment that needs one (db?) or more (db and queue?) components. Deploying locally to k8s (minikube) takes still some time (build the image, push it to the local registry, run the deployment manifests, etc.) which become a PITA for very small changes.

I prefer to run DBs using docker and docker-compose on my homeLab linux servers than installing MySQL through the package manager. A lot cleaner/easier/faster to configure.


👤 antoineMoPa
I hope not, because a single docker-compose file is much more readable and fun to work with than the multiple files required for a kubernetes setup with volumes.

👤 IceWreck
Right now, no but in the long term, probably yes.

Podman, which is a docker alternative also refuses to support docker-compose and points users towards kubernetes yaml.

From their repo:

"We believe that Kubernetes is the defacto standard for composing Pods and for orchestrating containers, making Kubernetes YAML a defacto standard file format. Hence, Podman allows the creation and execution of Pods from a Kubernetes YAML file (see podman-play-kube). Podman can also generate Kubernetes YAML based on a container or Pod (see podman-generate-kube), which allows for an easy transition from a local development environment to a production Kubernetes cluster."

On the other hand, docker-compose is now a proper spec instead of a docker only tool which may prolong its life

https://compose-spec.io/


👤 potta_coffee
I use Docker-Compose often for local development all the time and have yet to use k8s for any local development. K8s feels way too complicated for this.

👤 tqh
I think so, since v2 and v3 are two different things they made a mess of things. It should have been two different specs. Continuing with docker-compose name is just bad, release any improvements in a clean spec.

👤 ingvul
How does k8s replace docker-compose on local machines? I have used minikube to run a local k8s cluster on my laptop and it's terrible. docker-compose works just fine.

👤 lmiller1990
I use docker-compose everyday and it works great.

👤 aprdm
?? How does a tool "die" out of curiosity? And how would you even compare docker compose and k8s?