Don't attach stdin and stdout when in detach mode
This is primarily to make it work with Swarm, which checks that
AttachStd{in,out,err} is false when creating containers.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
200c44cff3
commit
e89826fe43
5 changed files with 34 additions and 6 deletions
|
|
@ -294,6 +294,7 @@ class TopLevelCommand(Command):
|
|||
start_links=True,
|
||||
recreate=False,
|
||||
insecure_registry=insecure_registry,
|
||||
detach=options['-d']
|
||||
)
|
||||
|
||||
tty = True
|
||||
|
|
@ -309,6 +310,7 @@ class TopLevelCommand(Command):
|
|||
'command': command,
|
||||
'tty': tty,
|
||||
'stdin_open': not options['-d'],
|
||||
'detach': options['-d'],
|
||||
}
|
||||
|
||||
if options['-e']:
|
||||
|
|
@ -432,6 +434,7 @@ class TopLevelCommand(Command):
|
|||
start_links=start_links,
|
||||
recreate=recreate,
|
||||
insecure_registry=insecure_registry,
|
||||
detach=options['-d']
|
||||
)
|
||||
|
||||
to_attach = [c for s in project.get_services(service_names) for c in s.containers()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue