<p>Docker compose is still a comparatively easy and light-weight tool to run multiple docker containers with service discovery.</p>
<p>Kubernetes is a metaphorical elephant.  Great if you need to smash Roman lines and win the battle, but overkill for a minor skirmish, and definitely more trouble than it's worth if you're trying to fight a small battle in the mountains.</p>
<p>If you have a fairly large app with multiple microservices, then Kubernetes is worth every penny.</p>
<p>But when you're trying to run just a couple of containers, especially if it's only on a single host (i.e. your frontend + backend and maybe a local instance of RabbitMQ), docker-compose is a much simpler/faster way to orchestrate it.  Kubernetes is like using a cannon to kill a mosquito when a flyswatter will do.</p>
<p>Example use cases where docker-compose works just fine:</p>
<ul>
<li>Local development environments running on your machine.  Even if you run Kubernetes in production, there's likely a lot of orchestration around getting it to work which would make it too complex for a single machine.</li>
<li>Simple apps without a lot of components</li>
<li>Single tenant apps which run on a single host</li>
<li>Deploying docker-based apps on bare VMs or physical hosts</li>
</ul>

CC BY-SA 4.0
2021-01-28T15:13:46.380Z
2021-01-28T16:30:05.027Z
2021-01-28T16:30:05.027Z
maplebird
<p>TL;DR - you'll use compose locally or for single machine deployments... Yes its worth learning, probably now more than ever as Docker is dominating local development tooling.</p>
<p>--</p>
<p>RE: Now that k8s won the orchestration war.............</p>
<p>The idea that K8s &quot;won the orchestration war&quot; is something that makes me cringe when I hear other people saying it.  It's propaganda that was percolated through the ranks by the CNCF marketing team so that people would just stop asking &quot;what if we do it this way&quot; and start adopting kubernetes.</p>
<p>The problem is, that even years after this came out, (it started circulating in probably 2018ish - I heard it at kubecon that year) its still absolutely untrue.  In fact, I'd say that k8s has hit peak hype and its likely to see a  bit of a decline in the coming years...</p>
<p>Why you might ask?? How could the &quot;war winner&quot; be taken from its throne?  It's pretty simple really, most organization don't need 99% of what k8s offers and on top of that they simply cannot afford the massive cost of managing a k8s deployment (its a LOT).</p>
<p>Now I'm a bit partial, as I work for <a href="https://cycle.io" rel="nofollow noreferrer">Cycle.io</a> - a LowOps PaaS thats a direct k8s competitor, but I'm also on the front lines of hearing the horror stories from company after company as they look to migrate away from k8s and get back to productive.  I don't expect you to take my word for it, but the growing masses are looking for k8s alternatives and you can find info on it all over the web.</p>
<p>I'd point you to <a href="https://dzone.com/articles/the-need-for-a-kubernetes-alternative" rel="nofollow noreferrer">this DZone article</a> for example.</p>

CC BY-SA 4.0
2022-08-25T19:02:23.077Z
2022-08-25T19:02:23.077Z
Chris Aubuchon
<blockquote>
<p>why I may still need Docker Compose, under with case Docker Compose is a better option?</p>
</blockquote>
<p>Need it for what? Better for what?
Docker Compose is mostly a different way to link multiple container-apps compared to Kubernetes and probably slightly more lightweight on a Desktop.</p>
<p>But if you run your apps in Kubernetes in production, you probably want to use as similar as possible solution on Desktop as well or none. In this case <a href="https://kind.sigs.k8s.io/" rel="nofollow noreferrer">Kind</a> or <a href="https://minikube.sigs.k8s.io/" rel="nofollow noreferrer">Minikube</a> is popular alternatives for Desktop - but usually you want to only run the app directly from the IDE when developing and only in some cases test it in a Kubernetes networked environment.</p>
<blockquote>
<p>I was wondering if it is still worth to learn docker compose ?</p>
</blockquote>
<p>Knowledge is good. At least you would learn when to use Docker Compose and when to use Kubernetes with knowledge about both. But if you are using Kubernetes at work and in production it is probably better use of your time to improve your Kubernetes skills and knowledge.</p>

CC BY-SA 4.0
2021-01-27T01:36:11.290Z
When to use Docker Compose is my question.
Qiulang 邱朗
CC BY-SA 4.0
2021-01-26T18:37:08.527Z
2021-01-26T18:37:08.527Z
Jonas
<p>I found Docker Compose just <a href="https://docs.docker.com/compose/release-notes/" rel="nofollow noreferrer">release 1.28 on 2021-1-20</a> but as Kubernetes won the container orchestration war I am not sure where and why I may still need Docker Compose, under with case Docker Compose is a better option?</p>
<p>I have a web app that consists of a php docker, a nodejs docker, a nginx docker. We host it at <a href="https://www.aliyun.com/" rel="nofollow noreferrer">aliyun</a> cloud service. In 2018 aliyun used docker swarm so we used docker compose but in 2020 we had switched k8s so I was wondering if it is still worth to learn docker compose ?</p>
<p>--- update ----</p>
<p>I found these articles were helpful</p>
<ol>
<li><a href="https://www.docker.com/blog/simplifying-kubernetes-with-docker-compose-and-friends/" rel="nofollow noreferrer">Why do I need Compose if I already have Kubernetes?</a> a docker blog published in 2018</li>
<li><a href="https://victorops.com/blog/docker-swarm-vs-kubernetes-for-single-host-implementations" rel="nofollow noreferrer">Docker Swarm vs. Kubernetes for Single-Host Implementations</a></li>
<li><a href="https://stackoverflow.com/questions/47536536/whats-the-difference-between-docker-compose-and-kubernetes">https://stackoverflow.com/questions/47536536/whats-the-difference-between-docker-compose-and-kubernetes</a> an answer is what I do currently:</li>
</ol>
<blockquote>
<p>If you are networking containers within the same host go for docker
compose.</p>
<p>If you are networking containers across multiple hosts go for
kubernetes.</p>
</blockquote>
<p>And that is what docker compose document said  <a href="https://docs.docker.com/compose/#common-use-cases" rel="nofollow noreferrer">https://docs.docker.com/compose/#common-use-cases</a></p>

<docker><kubernetes><docker-compose>
Where may I need Docker Compose as Kubernetes won the container orchestration war?
Qiulang 邱朗
# Where may I need Docker Compose as Kubernetes won the container orchestration war?

(Asked by: username_0 on 2021-01-26)

I found Docker Compose just [release 1.28 on 2021-1-20](https://docs.docker.com/compose/release-notes/) but as Kubernetes won the container orchestration war I am not sure where and why I may still need Docker Compose, under with case Docker Compose is a better option?

I have a web app that consists of a php docker, a nodejs docker, a nginx docker. We host it at [aliyun](https://www.aliyun.com/) cloud service. In 2018 aliyun used docker swarm so we used docker compose but in 2020 we had switched k8s so I was wondering if it is still worth to learn docker compose ?

--- update ----

I found these articles were helpful

1. [Why do I need Compose if I already have Kubernetes?](https://www.docker.com/blog/simplifying-kubernetes-with-docker-compose-and-friends/) a docker blog published in 2018
2. [Docker Swarm vs. Kubernetes for Single-Host Implementations](https://victorops.com/blog/docker-swarm-vs-kubernetes-for-single-host-implementations)
3. <https://stackoverflow.com/questions/47536536/whats-the-difference-between-docker-compose-and-kubernetes> an answer is what I do currently:

> If you are networking containers within the same host go for docker
> compose.
>
> If you are networking containers across multiple hosts go for
> kubernetes.

And that is what docker compose document said <https://docs.docker.com/compose/#common-use-cases>

**Tags:** docker, kubernetes, docker-compose


---

## 3 answers

### Answer by username_1 on 2021-01-28. Score: 4

Docker compose is still a comparatively easy and light-weight tool to run multiple docker containers with service discovery.

Kubernetes is a metaphorical elephant. Great if you need to smash Roman lines and win the battle, but overkill for a minor skirmish, and definitely more trouble than it's worth if you're trying to fight a small battle in the mountains.

If you have a fairly large app with multiple microservices, then Kubernetes is worth every penny.

But when you're trying to run just a couple of containers, especially if it's only on a single host (i.e. your frontend + backend and maybe a local instance of RabbitMQ), docker-compose is a much simpler/faster way to orchestrate it. Kubernetes is like using a cannon to kill a mosquito when a flyswatter will do.

Example use cases where docker-compose works just fine:

* Local development environments running on your machine. Even if you run Kubernetes in production, there's likely a lot of orchestration around getting it to work which would make it too complex for a single machine.
* Simple apps without a lot of components
* Single tenant apps which run on a single host
* Deploying docker-based apps on bare VMs or physical hosts


---

### Answer by username_2 on 2022-08-25. Score: 0

TL;DR - you'll use compose locally or for single machine deployments... Yes its worth learning, probably now more than ever as Docker is dominating local development tooling.

--

RE: Now that k8s won the orchestration war.............

The idea that K8s "won the orchestration war" is something that makes me cringe when I hear other people saying it. It's propaganda that was percolated through the ranks by the CNCF marketing team so that people would just stop asking "what if we do it this way" and start adopting kubernetes.

The problem is, that even years after this came out, (it started circulating in probably 2018ish - I heard it at kubecon that year) its still absolutely untrue. In fact, I'd say that k8s has hit peak hype and its likely to see a bit of a decline in the coming years...

Why you might ask?? How could the "war winner" be taken from its throne? It's pretty simple really, most organization don't need 99% of what k8s offers and on top of that they simply cannot afford the massive cost of managing a k8s deployment (its a LOT).

Now I'm a bit partial, as I work for [Cycle.io](https://cycle.io) - a LowOps PaaS thats a direct k8s competitor, but I'm also on the front lines of hearing the horror stories from company after company as they look to migrate away from k8s and get back to productive. I don't expect you to take my word for it, but the growing masses are looking for k8s alternatives and you can find info on it all over the web.

I'd point you to [this DZone article](https://dzone.com/articles/the-need-for-a-kubernetes-alternative) for example.


---

### Answer by username_3 on 2021-01-26. Score: 0

> why I may still need Docker Compose, under with case Docker Compose is a better option?

Need it for what? Better for what?
Docker Compose is mostly a different way to link multiple container-apps compared to Kubernetes and probably slightly more lightweight on a Desktop.

But if you run your apps in Kubernetes in production, you probably want to use as similar as possible solution on Desktop as well or none. In this case [Kind](https://kind.sigs.k8s.io/) or [Minikube](https://minikube.sigs.k8s.io/) is popular alternatives for Desktop - but usually you want to only run the app directly from the IDE when developing and only in some cases test it in a Kubernetes networked environment.

> I was wondering if it is still worth to learn docker compose ?

Knowledge is good. At least you would learn when to use Docker Compose and when to use Kubernetes with knowledge about both. But if you are using Kubernetes at work and in production it is probably better use of your time to improve your Kubernetes skills and knowledge.

> **Comments:**
> **username_0**: When to use Docker Compose is my question.  

---

