Normally, when you use docker run, you start one container manually β for example:
docker run -d -p 5432:5432 postgres
docker run -d -p 3000:3000 my-backend
Thatβs fine for testing,
but real-world apps have multiple containers β
backend, database, redis, frontend, etc.
Manually running each with docker run, linking networks, passing environment variables, etc., becomes messy and hard to manage.
Docker Compose is a tool that lets you:
So you can do:
docker compose up
and Docker will: