mirror of
https://github.com/docker/compose.git
synced 2025-07-20 12:14:41 +02:00
Merge pull request #7720 from aiordache/context_bug
Pass context to docker cli
This commit is contained in:
commit
155eb91259
@ -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