mirror of https://github.com/docker/docker-py.git
explain the socket parameter of exec_run
Signed-off-by: Martin Monperrus <martin.monperrus@gnieh.org>
This commit is contained in:
parent
af0071403c
commit
3470968937
|
@ -142,14 +142,16 @@ class Container(Model):
|
|||
detach (bool): If true, detach from the exec command.
|
||||
Default: False
|
||||
stream (bool): Stream response data. Default: False
|
||||
socket (bool): Whether to return a socket object or not. Default: False
|
||||
environment (dict or list): A dictionary or a list of strings in
|
||||
the following format ``["PASSWORD=xxx"]`` or
|
||||
``{"PASSWORD": "xxx"}``.
|
||||
|
||||
Returns:
|
||||
(generator or str): If ``stream=True``, a generator yielding
|
||||
response chunks. A string containing response data otherwise.
|
||||
|
||||
(generator or str):
|
||||
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).
|
||||
A string containing response data otherwise.
|
||||
Raises:
|
||||
:py:class:`docker.errors.APIError`
|
||||
If the server returns an error.
|
||||
|
|
Loading…
Reference in New Issue