Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does docker compose work under the hood?

How exactly does docker-compose work? The documentations only mention running multiple services in parallel, without mentioning how. I understand that the images are built and run, but how are they running in parallel?

Does it resemble Supervisor, which runs each of its services in a different OS process? Are all services being wrapped in one container?

How is it handled behind the scenes?

Running docker-compose up --verbose only reveals the following, which I am not sure what it means:

compose.parallel.feed_queue: Starting producer thread for <Service: web>
like image 304
AdamGold Avatar asked May 24 '26 19:05

AdamGold


1 Answers

docker-compose creates the docker containers for each service. It is similar to manually creating the containers using docker run commands for each service mentioned in the docker-compose.yml file.

It also does some extra stuff like creating a network and joining all the containers to the network, optionally building the image from a dockerfile etc.

like image 61
Shashank V Avatar answered May 27 '26 08:05

Shashank V