diff options
author | Joffrey F <joffrey@docker.com> | 2015-04-27 14:11:43 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2015-04-27 14:11:43 -0700 |
commit | e337a2317ef3e9f592d8d1d59790eb6dd0d7455c (patch) | |
tree | b87ca7a9ce400136f982f9248fc748399c6328ed /docs/api.md | |
parent | e2ad91bdf712d5630e47c5077ac7b02afe5ded44 (diff) | |
download | docker-py-exec_rework.tar.gz |
Updated exec API documentationexec_rework
Diffstat (limited to 'docs/api.md')
-rw-r--r-- | docs/api.md | 56 |
1 files changed, 43 insertions, 13 deletions
diff --git a/docs/api.md b/docs/api.md index 5afe533..d45626c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -256,28 +256,58 @@ function return a blocking generator you can iterate over to retrieve events as ## execute -```python -c.execute(container, cmd, detach=False, stdout=True, stderr=True, - stream=False, tty=False) -``` +This command is deprecated for docker-py >= 1.2.0 ; use `exec_create` and +`exec_start` instead. + +## exec_create + +Sets up an exec instance in a running container. + +**Params**: + +* container (str): Target container where exec instance will be created +* cmd (str or list): Command to be executed +* stdout (bool): Attach to stdout of the exec command if true. Default: True +* stderr (bool): Attach to stderr of the exec command if true. Default: True +* tty (bool): Allocate a pseudo-TTY. Default: False + +**Returns** (dict): A dictionary with an exec 'Id' key. + -Execute a command in a running container. +## exec_inspect + +Return low-level information about an exec command. **Params**: -* container (str): can be a container dictionary (result of -running `inspect_container`), unique id or container name. +* exec_id (str): ID of the exec instance + +**Returns** (dict): Dictionary of values returned by the endpoint. + +## exec_resize -* cmd (str or list): representing the command and its arguments. +Resize the tty session used by the specified exec command. + +**Params**: -* detach (bool): flag to `True` will run the process in the background. +* exec_id (str): ID of the exec instance +* height (int): Height of tty session +* width (int): Width of tty session + +## exec_start + +Start a previously set up exec instance. + +**Params**: -* stdout (bool): indicates which output streams to read from. -* stderr (bool): indicates which output streams to read from. +* exec_id (str): ID of the exec instance +* detach (bool): If true, detach from the exec command. Default: False +* tty (bool): Allocate a pseudo-TTY. Default: False +* stream (bool): Stream response data -* stream (bool): indicates whether to return a generator which will yield - the streaming response in chunks. +**Returns** (generator or str): If `stream=True`, a generator yielding response +chunks. A string containing response data otherwise. ## export |