Docker and CI/CD · Junior · Question 69 of 75
Why can't two containers on the default bridge reach each other by name?
- ✓Correct answer: Name resolution works only on user-defined networks
- 2Names are resolved only inside Docker Swarm
- 3Containers can never talk to each other directly
Explanation
Create a network (docker network create app) and attach both containers; Compose does this automatically for its services.