In earlier articles, we looked how to identify docker networks in our linux system, inspect an existing docker network and creating a new docker network bridge in Linux.
In this article, we will look to create two centos docker container and attach to same network.
Following command is used to add container quest to network while container process starts in Linux.
docker run .. options ... -network networkName
Lets see it in ubuntu linux shell example.
In above docker example, we created two bash shell process within a centos container and attached it to background working. When we investigate our network bridge "net4" that we attached bash shell processes to it, we verify that they got IPs. This bridge is single-host mode.