docker compose

best when read from here - https://docs.docker.com/compose/

docker compose is useful when we want to run and manage multiple containers in a single host using a single command!

difference in running containers using plain docker vs docker-compose!

Let’s take the classic voting app example by docker -

only docker

docker run -d --name=redis redis # run the redis container
 
docker run -d --name=db postgres # run the postgres container
 
docker run -d --name=vote -p 5000:80 voting-app # run the voting-app image and fwd the container port 80 to host port 5000
 
 

202604091736