Now we have our myNetwork ready, we can run the Docker container and attach it to the network. To launch containers, we are going to user the docker run --net=<NETWORK> option, where the <NETWORK> is the name of one of the default networks or the one you have created yourself. Let's run Apache Tomcat for example, which is an open source implementation of the Java Servlet and JavaServer pages technologies:
docker run -it --net=myNetwork tomcat
It will take a while. The Docker engine will pull all of the Tomcat's image layers from the Docker Hub and then run the Tomcat container. There's another option to attach the network to the container, you can inform Docker that you would like the container to connect to the same network as other containers use. This way, instead of specifying a network explicitly, you just...