mirror of https://github.com/docker/docker-py.git
Updated README with description of exec.
This commit is contained in:
parent
e70f985b31
commit
3ac4c78850
20
README.md
20
README.md
|
@ -100,6 +100,26 @@ c.diff(container)
|
|||
|
||||
Identical to the `docker diff` command.
|
||||
|
||||
```python
|
||||
c.exec(container, cmd, detach=False, stdout=True, stderr=True,
|
||||
stream=False, tty=False)
|
||||
```
|
||||
|
||||
Execute a command in a running container.
|
||||
|
||||
The `container` argument can be a container dictionary (result of
|
||||
running `inspect_container`), unique id or container name.
|
||||
|
||||
The `cmd` argument must be a `list` or `tuple`, representing the command
|
||||
and its arguments. Example `['ls', '-la']`.
|
||||
|
||||
Setting the `detach` flag to `True` will run the process in the background.
|
||||
|
||||
The `stdout` and `stderr` flags indicate which output streams to read from.
|
||||
|
||||
The `stream` flag indicates whether to return a generator which will yield
|
||||
the streaming response in chunks.
|
||||
|
||||
```python
|
||||
c.export(container)
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue