diff --git a/docs/port-bindings.md b/docs/port-bindings.md index a9b973fd..d31760c3 100644 --- a/docs/port-bindings.md +++ b/docs/port-bindings.md @@ -38,7 +38,16 @@ container_id = cli.create_container( ) ``` -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: + +```python +cli.create_host_config(port_bindings={ + 1111: [1234, 4567] +}) +``` + +You can also bind multiple IPs to a single container port: + ```python cli.create_host_config(port_bindings={ 1111: [ @@ -47,10 +56,3 @@ cli.create_host_config(port_bindings={ ] }) ``` - -Similarly for several container ports bound to a single host port: -```python -cli.create_host_config(port_bindings={ - 1111: [1234, 4567] -}) -```