From 93c9f3a4f18ff5d0516199cc569b1c8820034564 Mon Sep 17 00:00:00 2001 From: lstephen Date: Wed, 11 Oct 2017 11:10:36 -0700 Subject: [PATCH 1/2] Use minimum docker api version --- construi/target.py | 5 ++++- setup.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/construi/target.py b/construi/target.py index dd34819..0ec94cf 100644 --- a/construi/target.py +++ b/construi/target.py @@ -4,6 +4,8 @@ from compose.cli.docker_client import docker_client from compose.service import ConvergenceStrategy +from docker.constants import MINIMUM_DOCKER_API_VERSION + import dockerpty import sys import os @@ -21,7 +23,8 @@ def __init__(self, config): self.config = config self.project = Project.from_config( "construi_%s" % self.config.construi['project_name'], - config.compose, docker_client(os.environ)) + config.compose, + docker_client(os.environ, version=MINIMUM_DOCKER_API_VERSION)) @property def before(self): diff --git a/setup.py b/setup.py index 2dfcc7c..9b88d7a 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,10 @@ def run(self): requires = { - 'install': ['PyYAML == 3.11', 'docker-compose == 1.11.2', 'six == 1.10.0'], + 'install': [ + 'PyYAML == 3.11', 'docker == 2.5.1', 'docker-compose == 1.11.2', + 'six == 1.10.0' + ], 'setup': ['flake8 == 3.0.4', 'pytest-runner == 2.6.2', 'yapf == 0.16.1'], 'tests': ['pytest == 2.8.5', 'pytest-cov == 2.2.0'] } From 9924b2bb15cbc1b92827b9b5b35d4494639e04ed Mon Sep 17 00:00:00 2001 From: lstephen Date: Wed, 11 Oct 2017 11:18:56 -0700 Subject: [PATCH 2/2] Use auto version --- construi/target.py | 5 +---- setup.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/construi/target.py b/construi/target.py index 0ec94cf..7e107ca 100644 --- a/construi/target.py +++ b/construi/target.py @@ -4,8 +4,6 @@ from compose.cli.docker_client import docker_client from compose.service import ConvergenceStrategy -from docker.constants import MINIMUM_DOCKER_API_VERSION - import dockerpty import sys import os @@ -23,8 +21,7 @@ def __init__(self, config): self.config = config self.project = Project.from_config( "construi_%s" % self.config.construi['project_name'], - config.compose, - docker_client(os.environ, version=MINIMUM_DOCKER_API_VERSION)) + config.compose, docker_client(os.environ, version='auto')) @property def before(self): diff --git a/setup.py b/setup.py index 9b88d7a..2dfcc7c 100644 --- a/setup.py +++ b/setup.py @@ -39,10 +39,7 @@ def run(self): requires = { - 'install': [ - 'PyYAML == 3.11', 'docker == 2.5.1', 'docker-compose == 1.11.2', - 'six == 1.10.0' - ], + 'install': ['PyYAML == 3.11', 'docker-compose == 1.11.2', 'six == 1.10.0'], 'setup': ['flake8 == 3.0.4', 'pytest-runner == 2.6.2', 'yapf == 0.16.1'], 'tests': ['pytest == 2.8.5', 'pytest-cov == 2.2.0'] }