Tutorial by Examples

You need to find out the IP address of the container running in the host so you can, for example, connect to the web server running in it. docker-machine is what is used on MacOSX and Windows. Firstly, list your machines: $ docker-machine ls NAME ACTIVE DRIVER STATE URL ...
docker network create app-backend This command will create a simple bridged network called appBackend. No containers are attached to this network by default.
docker network ls This command lists all networks that have been created on the local Docker host. It includes the default bridge bridge network, the host host network, and the null null network. All containers by default are attached to the default bridge bridge network.
docker network connect app-backend myAwesomeApp-1 This command attaches the myAwesomeApp-1 container to the app-backend network. When you add a container to a user-defined network, the embedded DNS resolver (which is not a full-featured DNS server, and is not exportable) allows each container on ...
docker network disconnect app-backend myAwesomeApp-1 This command detaches the myAwesomeApp-1 container from the app-backend network. The container will no longer be able to communicate with other containers on the network it has been disconnected from, nor use the embedded DNS resolver to look u...
docker network rm app-backend This command removes the user-defined app-backend network from the Docker host. All containers on the network not otherwise connected via another network will lose communication with other containers. It is not possible to remove the default bridge bridge network, th...
docker network inspect app-backend This command will output details about the app-backend network. The of the output of this command should look similar to: [ { "Name": "foo", "Id": "a0349d78c8fd7c16f5940bdbaf1adec8d8399b8309b2e8a969bd4e...

Page 1 of 1