mirror of
https://github.com/docker/compose.git
synced 2025-07-20 20:24:30 +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')
|
key = dockeropts.get('--tlskey')
|
||||||
verify = dockeropts.get('--tlsverify')
|
verify = dockeropts.get('--tlsverify')
|
||||||
host = dockeropts.get('--host')
|
host = dockeropts.get('--host')
|
||||||
|
context = dockeropts.get('--context')
|
||||||
tls_options = []
|
tls_options = []
|
||||||
if tls:
|
if tls:
|
||||||
tls_options.append('--tls')
|
tls_options.append('--tls')
|
||||||
@ -1454,6 +1455,10 @@ def call_docker(args, dockeropts, environment):
|
|||||||
tls_options.extend(
|
tls_options.extend(
|
||||||
['--host', re.sub(r'^https?://', 'tcp://', host.lstrip('='))]
|
['--host', re.sub(r'^https?://', 'tcp://', host.lstrip('='))]
|
||||||
)
|
)
|
||||||
|
if context:
|
||||||
|
tls_options.extend(
|
||||||
|
['--context', context]
|
||||||
|
)
|
||||||
|
|
||||||
args = [executable_path] + tls_options + args
|
args = [executable_path] + tls_options + args
|
||||||
log.debug(" ".join(map(pipes.quote, args)))
|
log.debug(" ".join(map(pipes.quote, args)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user