Docker and CI/CD · Junior · Question 24 of 75

In Compose, how does the app service connect to the db service?

Explanation

Compose puts services on a shared network with built-in DNS, so the service name resolves to the right container. IPs change between runs; names don't.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 24

Test yourself

Take the Docker and CI/CD · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz