Docker Compose and Kubernetes both run apps made of several containers. Compose starts the whole stack on one machine from a single file; Kubernetes runs and manages containers across a cluster of servers.
Most real apps need more than one container: a frontend, a backend and a database at the very least. Starting each one by hand, with the right ports, networks and environment variables, is slow and easy to get wrong. Both tools replace that with a written description of what should run. Where they differ is how much they do once it is running.
What Docker Compose does
Compose reads a YAML file, usually called compose.yaml, that lists each service in your app: the image it runs, its ports, its environment variables and any volumes it needs. docker compose up creates a private network for the stack, starts every container and lets them find each other by service name, so the backend can connect to a host called database. docker compose down removes the lot again.
Here is a three-service stack coming up with one command:
Because the file lives in the repository, everyone on the team runs the same versions of the same services. A new developer clones the project, runs one command and has a working stack, instead of following a page of setup notes. The Docker Compose video walks through the file itself.
Where Compose fits
Wondering how this was made? How we make these