mirror of
https://github.com/docker/compose.git
synced 2026-02-09 01:59:22 +08:00
check context in use targets a docker engine
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user