Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs typo and port_bindings check #2703

Merged
merged 1 commit into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/models/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def run(self, image, command=None, stdout=True, stderr=False,
to a single container port. For example,
``{'1111/tcp': [1234, 4567]}``.

Imcompatible with ``host`` in ``network_mode``.
Incompatible with ``host`` 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
Expand Down
4 changes: 2 additions & 2 deletions docker/types/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def __init__(self, version, binds=None, port_bindings=None,
if dns_search:
self['DnsSearch'] = dns_search

if network_mode is 'host' and port_bindings is not None:
if network_mode is 'host' and port_bindings:
raise host_config_incompatible_error(
'network_mode', 'host', 'port_bindings'
)
Expand Down Expand Up @@ -670,7 +670,7 @@ def host_config_value_error(param, param_value):


def host_config_incompatible_error(param, param_value, incompatible_param):
error_msg = 'Incompatible {1} in {0} is not compatible with {2}'
error_msg = '\"{1}\" {0} is incompatible with {2}'
return errors.InvalidArgument(
error_msg.format(param, param_value, incompatible_param)
)
Expand Down