Create an internal network so Docker containers can communicate without exposing ports on your host machine. In this video I show you the current "best practice" for getting Docker containers to talk to each other behind the scenes.
Generally, we love that containers don't interfere with each other, but we also don't want to include an entire MySQL server inside every app we create. Using this method, we can have a single MySQL instance running in a container, and use it for all our other containers.
If you're interested in learning more about Docker, be sure to check out my course at CBT Nuggets. If you're not a subscriber, you can get a free week to watch as much of our training as you like. https://snar.co/cbt-docker
0:00 Why Share a Database Container?
0:45 How Docker Creates Networks
2:35 Creating a Network and Containers
5:46 Wrap Up and Next Steps