Merge "Set docker api version to auto"
This commit is contained in:
commit
c21ac63691
@ -51,6 +51,11 @@ class KollaUnknownBuildTypeException(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def docker_client():
|
||||||
|
docker_kwargs = docker.utils.kwargs_from_env()
|
||||||
|
return docker.Client(version='auto', **docker_kwargs)
|
||||||
|
|
||||||
|
|
||||||
class WorkerThread(Thread):
|
class WorkerThread(Thread):
|
||||||
|
|
||||||
def __init__(self, queue, config):
|
def __init__(self, queue, config):
|
||||||
@ -58,7 +63,7 @@ class WorkerThread(Thread):
|
|||||||
self.nocache = config['no_cache']
|
self.nocache = config['no_cache']
|
||||||
self.forcerm = not config['keep']
|
self.forcerm = not config['keep']
|
||||||
self.retries = config['retries']
|
self.retries = config['retries']
|
||||||
self.dc = docker.Client(**docker.utils.kwargs_from_env())
|
self.dc = docker_client()
|
||||||
super(WorkerThread, self).__init__()
|
super(WorkerThread, self).__init__()
|
||||||
|
|
||||||
def end_task(self, image):
|
def end_task(self, image):
|
||||||
@ -581,7 +586,7 @@ class KollaWorker(object):
|
|||||||
|
|
||||||
|
|
||||||
def push_image(image):
|
def push_image(image):
|
||||||
dc = docker.Client(**docker.utils.kwargs_from_env())
|
dc = docker_client()
|
||||||
image['push_logs'] = str()
|
image['push_logs'] = str()
|
||||||
|
|
||||||
for response in dc.push(image['fullname'],
|
for response in dc.push(image['fullname'],
|
||||||
|
@ -70,7 +70,7 @@ function setup_ansible {
|
|||||||
RAW_INVENTORY=/tmp/kolla/raw_inventory
|
RAW_INVENTORY=/tmp/kolla/raw_inventory
|
||||||
mkdir /tmp/kolla
|
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
|
setup_inventory
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user