Whenever we run a Docker image to create and boot up a container, it uses the default bridge network, which Docker creates during installation. To run an image on a specific network, which may be either user-defined or one of the other two networks that Docker creates automatically, host or none, we have to provide the additional --net flag with the value as the network name as part of the docker run command.
In this recipe, we will run a MySQL image on the user-defined bridge network that we created in the previous recipe, passing the --net flag value as my-bridge-network.