@@ -256,28 +256,58 @@ function return a blocking generator you can iterate over to retrieve events as
256
256
257
257
## execute
258
258
259
- ``` python
260
- c.execute(container, cmd, detach = False , stdout = True , stderr = True ,
261
- stream = False , tty = False )
262
- ```
259
+ This command is deprecated for docker-py >= 1.2.0 ; use ` exec_create ` and
260
+ ` exec_start ` instead.
261
+
262
+ ## exec_create
263
+
264
+ Sets up an exec instance in a running container.
265
+
266
+ ** Params** :
267
+
268
+ * container (str): Target container where exec instance will be created
269
+ * cmd (str or list): Command to be executed
270
+ * stdout (bool): Attach to stdout of the exec command if true. Default: True
271
+ * stderr (bool): Attach to stderr of the exec command if true. Default: True
272
+ * tty (bool): Allocate a pseudo-TTY. Default: False
273
+
274
+ ** Returns** (dict): A dictionary with an exec 'Id' key.
275
+
263
276
264
- Execute a command in a running container.
277
+ ## exec_inspect
278
+
279
+ Return low-level information about an exec command.
265
280
266
281
** Params** :
267
282
268
- * container (str): can be a container dictionary (result of
269
- running ` inspect_container ` ), unique id or container name.
283
+ * exec_id (str): ID of the exec instance
284
+
285
+ ** Returns** (dict): Dictionary of values returned by the endpoint.
286
+
270
287
288
+ ## exec_resize
271
289
272
- * cmd (str or list): representing the command and its arguments.
290
+ Resize the tty session used by the specified exec command.
291
+
292
+ ** Params** :
273
293
274
- * detach (bool): flag to ` True ` will run the process in the background.
294
+ * exec_id (str): ID of the exec instance
295
+ * height (int): Height of tty session
296
+ * width (int): Width of tty session
297
+
298
+ ## exec_start
299
+
300
+ Start a previously set up exec instance.
301
+
302
+ ** Params** :
275
303
276
- * stdout (bool): indicates which output streams to read from.
277
- * stderr (bool): indicates which output streams to read from.
304
+ * exec_id (str): ID of the exec instance
305
+ * detach (bool): If true, detach from the exec command. Default: False
306
+ * tty (bool): Allocate a pseudo-TTY. Default: False
307
+ * stream (bool): Stream response data
278
308
279
- * stream (bool ): indicates whether to return a generator which will yield
280
- the streaming response in chunks .
309
+ ** Returns ** (generator or str ): If ` stream=True ` , a generator yielding response
310
+ chunks. A string containing response data otherwise .
281
311
282
312
## export
283
313
0 commit comments