mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Pass context to docker cli
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
c2be70a108
commit
134319c735
@ -1439,6 +1439,7 @@ def call_docker(args, dockeropts, environment):
|
||||
key = dockeropts.get('--tlskey')
|
||||
verify = dockeropts.get('--tlsverify')
|
||||
host = dockeropts.get('--host')
|
||||
context = dockeropts.get('--context')
|
||||
tls_options = []
|
||||
if tls:
|
||||
tls_options.append('--tls')
|
||||
@ -1454,6 +1455,10 @@ def call_docker(args, dockeropts, environment):
|
||||
tls_options.extend(
|
||||
['--host', re.sub(r'^https?://', 'tcp://', host.lstrip('='))]
|
||||
)
|
||||
if context:
|
||||
tls_options.extend(
|
||||
['--context', context]
|
||||
)
|
||||
|
||||
args = [executable_path] + tls_options + args
|
||||
log.debug(" ".join(map(pipes.quote, args)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user