Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions steps/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
import time
import multiprocessing as mp

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

base_url = os.environ.get("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
d = docker.APIClient(version=DOCKER_API_VERSION, base_url=base_url)
base_url = os.getenv("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
d = docker.APIClient(version=DOCKER_MIN_API_VERSION, base_url=base_url)


class ExecException(Exception):
Expand Down Expand Up @@ -259,4 +258,3 @@ def _create_container(self, **kwargs):
volumes=volume_mount_points,
host_config=d.create_host_config(**host_args),
**kwargs)

7 changes: 3 additions & 4 deletions steps/image_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,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"
DOCKER_MIN_API_VERSION = os.getenv("DOCKER_MIN_API_VERSION", "1.44")

base_url = os.environ.get("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
DOCKER_CLIENT = docker.APIClient(version=DOCKER_API_VERSION, base_url=base_url)
base_url = os.getenv("DOCKER_HOST", docker.constants.DEFAULT_UNIX_SOCKET)
DOCKER_CLIENT = docker.APIClient(version=DOCKER_MIN_API_VERSION, base_url=base_url)

@then(u'the image should contain label {label}')
@then(u'the image should contain label {label} {check} value {value}')
Expand Down