Creating a network

When we prepare a network with the WeaveWorks driver, please keep in mind that we always need to specify the --subnet and --gateway parameters as we do not use the default subnet value provided by the Docker's libnetwork. We need to make a network attachable, with --attachable, to allow containers started using docker run command attach to the network. Without this option, only Swarm services, started by docker service create, are allowed to join the network.

For example, we can create a class C network using the following command:

$ docker network create -d weaveworks/net-plugin:2.1.3 
--subnet=10.32.0.0/24
--gateway=10.32.0.1
--attachable my_net
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset