Set docker api version to auto

Change-Id: I25d957a2368fa4e52b5fa9253d7ea5ec4046d830
Closes-Bug: #1521949
This commit is contained in:
Artur Zarzycki 2015-12-02 15:47:02 +01:00
parent 917b4df01e
commit dc2ad7d134
2 changed files with 8 additions and 3 deletions

View File

@ -51,6 +51,11 @@ class KollaUnknownBuildTypeException(Exception):
pass
def docker_client():
docker_kwargs = docker.utils.kwargs_from_env()
return docker.Client(version='auto', **docker_kwargs)
class WorkerThread(Thread):
def __init__(self, queue, config):
@ -58,7 +63,7 @@ class WorkerThread(Thread):
self.nocache = config['no_cache']
self.forcerm = not config['keep']
self.retries = config['retries']
self.dc = docker.Client(**docker.utils.kwargs_from_env())
self.dc = docker_client()
super(WorkerThread, self).__init__()
def end_task(self, image):
@ -581,7 +586,7 @@ class KollaWorker(object):
def push_image(image):
dc = docker.Client(**docker.utils.kwargs_from_env())
dc = docker_client()
image['push_logs'] = str()
for response in dc.push(image['fullname'],

View File

@ -70,7 +70,7 @@ function setup_ansible {
RAW_INVENTORY=/tmp/kolla/raw_inventory
mkdir /tmp/kolla
sudo -H pip install "ansible<2" docker-py
sudo -H pip install "ansible<2" "docker-py>=1.4.0,<1.6.0"
setup_inventory