Use docker.client.create_host_config
create_host_config from docker.utils will be deprecated so that the new create_host_config has access to the _version so we can ensure that network_mode only gets set to 'default' by default if the version is high enough and won't explode. Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit is contained in:
parent
f49fc1867c
commit
42c890796b
2 changed files with 8 additions and 2 deletions
|
|
@ -11,7 +11,6 @@ from operator import attrgetter
|
|||
import enum
|
||||
import six
|
||||
from docker.errors import APIError
|
||||
from docker.utils import create_host_config
|
||||
from docker.utils import LogConfig
|
||||
from docker.utils.ports import build_port_bindings
|
||||
from docker.utils.ports import split_port
|
||||
|
|
@ -678,7 +677,7 @@ class Service(object):
|
|||
|
||||
devices = options.get('devices', None)
|
||||
|
||||
return create_host_config(
|
||||
return self.client.create_host_config(
|
||||
links=self._get_links(link_to_self=one_off),
|
||||
port_bindings=port_bindings,
|
||||
binds=options.get('binds'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue