docker: redirect stderr to stdout for nicer exceptions.

Unclear whether or not this is a hack, or whether it should be the
default for more connection methods. When enabled, the exception text
thrown when bootstrap fails includes the stderr text, which is
apparently always useful.
This commit is contained in:
David Wilson 2018-08-11 17:46:44 +01:00
parent df112be704
commit 7d62c79ab7
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ class Stream(mitogen.parent.Stream):
username = None
docker_path = 'docker'
# TODO: better way of capturing errors such as "No such container."
create_child_args = {
'merge_stdio': True
}
def construct(self, container=None, image=None,
docker_path=None, username=None,
**kwargs):