diff --git a/docker/api/container.py b/docker/api/container.py index cfd51470..754b5dc6 100644 --- a/docker/api/container.py +++ b/docker/api/container.py @@ -524,8 +524,6 @@ class ContainerApiMixin(object): stack. - ``host`` Use the host network stack. This mode is incompatible with ``port_bindings``. - If ``host`` is used as network_mode, all of listed up to - ``port_bindings``` are ignored in running container. oom_kill_disable (bool): Whether to disable OOM killer. oom_score_adj (int): An integer value containing the score given @@ -535,8 +533,8 @@ class ContainerApiMixin(object): pids_limit (int): Tune a container's pids limit. Set ``-1`` for unlimited. port_bindings (dict): See :py:meth:`create_container` - for more information. The binding ports are ignored in - ``host`` as network mode. + for more information. + Imcompatible with ``host`` in ``network_mode``. privileged (bool): Give extended privileges to this container. publish_all_ports (bool): Publish all ports to the host. read_only (bool): Mount the container's root filesystem as read diff --git a/docker/models/containers.py b/docker/models/containers.py index bcd78017..120386a1 100644 --- a/docker/models/containers.py +++ b/docker/models/containers.py @@ -649,9 +649,7 @@ class ContainerCollection(Collection): - ``container:`` Reuse another container's network stack. - ``host`` Use the host network stack. - This mode is incompatible with ``ports``. If ``host`` is - used as network_mode, all of listed up to ``ports``` are - ignored in running container. + This mode is incompatible with ``ports``. Incompatible with ``network``. oom_kill_disable (bool): Whether to disable OOM killer. @@ -670,8 +668,6 @@ class ContainerCollection(Collection): ``port/protocol``, where the protocol is either ``tcp``, ``udp``, or ``sctp``. - Ports are ignored to bind with ``host`` as network mode. - The values of the dictionary are the corresponding ports to open on the host, which can be either: @@ -687,6 +683,7 @@ class ContainerCollection(Collection): to a single container port. For example, ``{'1111/tcp': [1234, 4567]}``. + Imcompatible with ``host`` in ``network_mode``. privileged (bool): Give extended privileges to this container. publish_all_ports (bool): Publish all ports to the host. read_only (bool): Mount the container's root filesystem as read