-
Stop / Remove all Containers using Powershell
$ docker stop $(docker ps -q) $ docker rm $(docker ps -qa)
-
List all container networks and view details of BRIDGE network
$ docker network ls $ docker inspect bridge ## You should have ZERO containers in BRIDGE network
-
Launch FIRST container in BRIDGE network
$ docker run -d --net bridge --name c1 nginx $ docker inspect c1 -f "{{ .NetworkSettings.IPAddress }}"
-
Launch SECOND container in BRIDGE network
$ docker run -it --net brigde --name c2 mahendrshinde/mysql-client bash $ hostname -i ### Please replace IP address from one that you received in step #3. $ curl http://172.17.0.2 $ exit
-
View the list of containers in BRIDGE network
$ docker inspect bridge