From bac2e879b272a87c5a1407338d0460999a866370 Mon Sep 17 00:00:00 2001 From: Joshua Conner Date: Thu, 17 Apr 2014 16:05:50 -0700 Subject: [PATCH] docker: send 1.10 params if docker-py is new enough version --- cloud/docker | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cloud/docker b/cloud/docker index 8288d366b6a..18989432731 100644 --- a/cloud/docker +++ b/cloud/docker @@ -565,6 +565,9 @@ class DockerManager: 'privileged': self.module.params.get('privileged'), 'links': self.links, } + if docker.utils.compare_version('1.10', self.client.version()['ApiVersion']) >= 0 and hasattr(docker, '__version__') and docker.__version__ > '0.3.0': + params['dns'] = self.module.params.get('dns') + params['volumes_from'] = self.module.params.get('volumes_from') for i in containers: self.client.start(i['Id'], **params)