summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2016-01-28 17:55:36 -0800
committerJoffrey F <joffrey@docker.com>2016-01-28 17:55:36 -0800
commit41d049a11c6f23e99bc4ab4a0593e7305c244b2c (patch)
tree9afc0c8ad270e5bf67c0f5c2017214c60bb92412
parent446e6d08dd569194a27bb354a184b7d94ecf5e48 (diff)
downloaddocker-py-495_port_bindings_advanced_doc.tar.gz
Advanced documentation for port bindings495_port_bindings_advanced_doc
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r--docs/port-bindings.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/port-bindings.md b/docs/port-bindings.md
index a9ff80e..a9b973f 100644
--- a/docs/port-bindings.md
+++ b/docs/port-bindings.md
@@ -37,3 +37,20 @@ container_id = cli.create_container(
})
)
```
+
+If trying to bind several IPs to the same port, you may use the following syntax:
+```python
+cli.create_host_config(port_bindings={
+ 1111: [
+ ('192.168.0.100', 1234),
+ ('192.168.0.101', 1234)
+ ]
+})
+```
+
+Similarly for several container ports bound to a single host port:
+```python
+cli.create_host_config(port_bindings={
+ 1111: [1234, 4567]
+})
+```