Ask HN: 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?

6 points | by wg0 1247 days ago

9 comments

  • atmosx 1247 days ago
    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.

    • dmarlow 1246 days ago
      This! I prefer to define various docker-compose files wrapped with a makefile. Then, spin up various parts of the project with simple commands like `make api-up`

      It's so easy and simple, I don't know how I ever lived without it. So much is supported, I feel like it's so easy to get everyone on a team on the same page without having to install and configure so many different things.

      Funny enough, despite all of these containers, I actually don't deploy any to actually run any of the code or dependecies. It's all just for the ease and speed of development.

      • cnimativ 1238 days ago
        I think that's the disconnect between docker-compose and ops. It's really easy to setup the dev env, but there's no direct way yet of deploying docker-compose stack somewhere w/o wrangling/writing a bunch of yml files using different libraries...
    • ahpearce 1247 days ago
      I've been doing this a lot lately as well. It's just really easy to have a directory of compose scripts in your home dir, and setup a simple bash alias/func to stand up a quick database.
  • antoineMoPa 1247 days ago
    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 1247 days ago
    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/

    • adkadskhj 1247 days ago
      For local simple use cases (a couplefew services / dbs), is there something stopping a docker-compose-like tool, maybe Podman + Kubernetes YAML, from being equally easy to use as docker-compose?

      For the flaws of Docker, local development is just easy - which is really nice. It concerns me to hear that docker-compose might be dead.

  • potta_coffee 1247 days ago
    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 1247 days ago
    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 1246 days ago
    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 1246 days ago
    I use docker-compose everyday and it works great.
  • aprdm 1246 days ago
    ?? How does a tool "die" out of curiosity? And how would you even compare docker compose and k8s?
  • fizzbuzzah 1247 days ago
    I still use it. I am not a believer in this microservice nonsense. Monolith can be scaled effectively just as microservices.