Exec

Reference

Exec

class aiodocker.execs.Exec(docker, id, tty)[source]
property id: str
Return type

str

coroutine inspect(self)[source]
Return type

Dict[str, Any]

coroutine resize(self, *, h=None, w=None)[source]
Return type

None

start(*, timeout: aiohttp.client.ClientTimeout = 'None', detach: typing_extensions.Literal[False] = 'False') aiodocker.stream.Stream[source]
start(*, timeout: aiohttp.client.ClientTimeout = 'None', detach: typing_extensions.Literal[True]) bytes

Start this exec instance. :param timeout: The timeout in seconds for the request to start the exec instance. :param detach: Indicates whether we should detach from the command (like the -d

option to docker exec).

Parameters

tty – Indicates whether a TTY should be allocated (like the -t option to docker exec).

Returns

If detach is True, this method will return the result of the exec process as a binary string. If detach is False, an aiohttp.ClientWebSocketResponse will be returned. You can use it to send and receive data the same wa as the response of “ws_connect” of aiohttp. If tty is False, then the messages returned from receive* will have their extra attribute set to 1 if the data was from stdout or 2 if from stderr.

ExecStream