summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2016-08-23 15:04:25 -0700
committerGitHub <noreply@github.com>2016-08-23 15:04:25 -0700
commit0acdd19665266c7b5c7e8e6d39e69781b4ab30a3 (patch)
tree480c98e9bf03f3605a3ab83ca76b64a1c7fb068d /docker
parentc5a81002c6af649ed5deef44b154b05627559e1b (diff)
parent93b4b4134e2c046433649c5e86d9c65ffd84f106 (diff)
downloaddocker-py-0acdd19665266c7b5c7e8e6d39e69781b4ab30a3.tar.gz
Merge pull request #1131 from Knetic/dnsopts
Implemented dns_opt support (from api 1.21)
Diffstat (limited to 'docker')
-rw-r--r--docker/utils/utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index bea436a..b8e947c 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -620,7 +620,7 @@ def create_host_config(binds=None, port_bindings=None, lxc_conf=None,
device_write_bps=None, device_read_iops=None,
device_write_iops=None, oom_kill_disable=False,
shm_size=None, sysctls=None, version=None, tmpfs=None,
- oom_score_adj=None):
+ oom_score_adj=None, dns_opt=None):
host_config = {}
@@ -719,6 +719,12 @@ def create_host_config(binds=None, port_bindings=None, lxc_conf=None,
if dns is not None:
host_config['Dns'] = dns
+ if dns_opt is not None:
+ if version_lt(version, '1.21'):
+ raise host_config_version_error('dns_opt', '1.21')
+
+ host_config['DnsOptions'] = dns_opt
+
if security_opt is not None:
if not isinstance(security_opt, list):
raise host_config_type_error('security_opt', security_opt, 'list')