diff --git a/compose/cli/docker_client.py b/compose/cli/docker_client.py index 4553eee86..7190cfff0 100644 --- a/compose/cli/docker_client.py +++ b/compose/cli/docker_client.py @@ -144,6 +144,11 @@ def docker_client(environment, version=None, context=None, tls_version=None): if tls: context.set_endpoint("docker", host=host, tls_cfg=tls, skip_tls_verify=not verify) + if not context.is_docker_host(): + raise UserError( + "The platform targeted with the current context is not supported.\n" + "Make sure the context in use targets a Docker Engine.\n") + kwargs['base_url'] = context.Host if context.TLSConfig: kwargs['tls'] = context.TLSConfig diff --git a/requirements.txt b/requirements.txt index 3c86344d9..f97467375 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ certifi==2020.4.5.1 chardet==3.0.4 colorama==0.4.3; sys_platform == 'win32' distro==1.5.0 -docker==4.2.1 +docker==4.2.2 docker-pycreds==0.4.0 dockerpty==0.4.1 docopt==0.6.2