summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAanand Prasad <aanand.prasad@gmail.com>2016-01-05 12:55:45 +0000
committerAanand Prasad <aanand.prasad@gmail.com>2016-01-05 12:55:45 +0000
commit62d9964cc1881f6f3cd021594cd40fd80a8fc855 (patch)
tree3e26ffbbe67582f2eb5f5cc36075eeefa82e08b6 /docs
parent140879d65720646b87fe7a8809a8f2a7846ade39 (diff)
parent67a29441c4605c4027fa22484f3d14f36349c6bb (diff)
downloaddocker-py-62d9964cc1881f6f3cd021594cd40fd80a8fc855.tar.gz
Merge pull request #818 from rmb938/patch-1
allow custom ipam options when creating networks
Diffstat (limited to 'docs')
-rw-r--r--docs/networks.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/networks.md b/docs/networks.md
new file mode 100644
index 0000000..4193537
--- /dev/null
+++ b/docs/networks.md
@@ -0,0 +1,20 @@
+# Using Networks
+
+With the release of Docker 1.9 you can now manage custom networks.
+
+
+Here you can see how to create a network named ```network1``` using the ```bridge``` driver
+
+```python
+docker_client.create_network("network1", driver="bridge")
+```
+
+You can also create more advanced networks with custom IPAM configurations. For example,
+setting the subnet to ```192.168.52.0/24``` and gateway to ```192.168.52.254```
+
+```python
+
+ipam_config = docker.utils.create_ipam_config(subnet='192.168.52.0/24', gateway='192.168.52.254')
+
+docker_client.create_network("network1", driver="bridge", ipam=ipam_config)
+```