socket (bool): Whether to return a socket object or not. Default: False
socket (bool): Return the connection socket to allow custom
read/write operations. Default: False
environment (dict or list): A dictionary or a list of strings in
environment (dict or list): A dictionary or a list of strings in
the following format ``["PASSWORD=xxx"]`` or
the following format ``["PASSWORD=xxx"]`` or
``{"PASSWORD": "xxx"}``.
``{"PASSWORD": "xxx"}``.
...
@@ -150,7 +151,7 @@ class Container(Model):
...
@@ -150,7 +151,7 @@ class Container(Model):
Returns:
Returns:
(generator or str):
(generator or str):
If ``stream=True``, a generator yielding response chunks.
If ``stream=True``, a generator yielding response chunks.
If ``socket=True``, a socket object of the connection (an SSL wrapped socket for TLS-based docker, on which one must call ``sendall`` and ``recv`` -- and **not** os.read / os.write).
If ``socket=True``, a socket object for the connection.