Running a web application Docker container linked with a MySQL Docker container on a user-defined bridge network

In this recipe, we will learn how to run a Go web application Docker image to create a container which will communicate with the MYSQL database instance running in a separate Docker container.

As we know Docker does not support automatic service discovery on the default bridge network, we will be using the user-defined network that we created in one of our previous recipes to run a Go web application Docker image.

Get Go Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.