diff --git a/steps/container.py b/steps/container.py index 575c940..ca1d328 100644 --- a/steps/container.py +++ b/steps/container.py @@ -32,10 +32,10 @@ import time import multiprocessing as mp -try: - d = docker.Client(version="1.22") -except: - d = docker.APIClient(version="1.22") +# A future version of Cekit will expose this to us, for now we hard-code +DOCKER_API_VERSION = "1.35" + +d = docker.APIClient(version=DOCKER_API_VERSION) class ExecException(Exception): diff --git a/steps/image_steps.py b/steps/image_steps.py index 6b18ca7..01ff4a0 100644 --- a/steps/image_steps.py +++ b/steps/image_steps.py @@ -3,12 +3,10 @@ from behave import then +# A future version of Cekit will expose this to us, for now we hard-code +DOCKER_API_VERSION = "1.35" -try: - DOCKER_CLIENT = docker.Client(version="1.22") -except: - DOCKER_CLIENT = docker.APIClient(version="1.22") - +DOCKER_CLIENT = docker.APIClient(version=DOCKER_API_VERSION) @then(u'the image should contain label {label}') @then(u'the image should contain label {label} {check} value {value}')