We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 88b5ed7 + 449e037 commit 3162c78Copy full SHA for 3162c78
docs/port-bindings.md
@@ -38,19 +38,21 @@ container_id = cli.create_container(
38
)
39
```
40
41
-If trying to bind several IPs to the same port, you may use the following syntax:
+To bind multiple host ports to a single container port, use the following syntax:
42
+
43
```python
44
cli.create_host_config(port_bindings={
- 1111: [
45
- ('192.168.0.100', 1234),
46
- ('192.168.0.101', 1234)
47
- ]
+ 1111: [1234, 4567]
48
})
49
50
51
-Similarly for several container ports bound to a single host port:
+You can also bind multiple IPs to a single container port:
52
53
54
- 1111: [1234, 4567]
+ 1111: [
+ ('192.168.0.100', 1234),
55
+ ('192.168.0.101', 1234)
56
+ ]
57
58
0 commit comments