Skip to content

Commit c922350

Browse files
authored
Update DOCKER_API_VERSION to 1.44 and rename to DOCKER_MIN_API_VERSION (#84)
1 parent fc9c1fd commit c922350

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

steps/container.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@
3232
import time
3333
import multiprocessing as mp
3434

35-
# A future version of Cekit will expose this to us, for now we hard-code
36-
DOCKER_API_VERSION = "1.35"
35+
DOCKER_MIN_API_VERSION = os.getenv("DOCKER_MIN_API_VERSION", "1.44")
3736

38-
base_url = os.environ.get("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
39-
d = docker.APIClient(version=DOCKER_API_VERSION, base_url=base_url)
37+
base_url = os.getenv("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
38+
d = docker.APIClient(version=DOCKER_MIN_API_VERSION, base_url=base_url)
4039

4140

4241
class ExecException(Exception):
@@ -259,4 +258,3 @@ def _create_container(self, **kwargs):
259258
volumes=volume_mount_points,
260259
host_config=d.create_host_config(**host_args),
261260
**kwargs)
262-

steps/image_steps.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
from behave import then
66

7-
# A future version of Cekit will expose this to us, for now we hard-code
8-
DOCKER_API_VERSION = "1.35"
7+
DOCKER_MIN_API_VERSION = os.getenv("DOCKER_MIN_API_VERSION", "1.44")
98

10-
base_url = os.environ.get("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
11-
DOCKER_CLIENT = docker.APIClient(version=DOCKER_API_VERSION, base_url=base_url)
9+
base_url = os.getenv("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
10+
DOCKER_CLIENT = docker.APIClient(version=DOCKER_MIN_API_VERSION, base_url=base_url)
1211

1312
@then(u'the image should contain label {label}')
1413
@then(u'the image should contain label {label} {check} value {value}')

0 commit comments

Comments
 (0)