mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* docs(docs): start implementing docs website * update video url * add autogenerated codebase docs for backend * precommit * update links * fix config and video * gh actions * rename * workdirs * path * path * fix doc1 * redo markdown * docs * change main folder name * simplify readme * add back architecture * Fix lint errors * lint * update poetry lock --------- Co-authored-by: Jim Su <jimsu@protonmail.com>
98 lines
2.6 KiB
Markdown
98 lines
2.6 KiB
Markdown
---
|
||
sidebar_label: process
|
||
title: opendevin.sandbox.docker.process
|
||
---
|
||
|
||
## DockerProcess Objects
|
||
|
||
```python
|
||
class DockerProcess(Process)
|
||
```
|
||
|
||
Represents a background command execution
|
||
|
||
#### \_\_init\_\_
|
||
|
||
```python
|
||
def __init__(id: int, command: str, result, pid: int)
|
||
```
|
||
|
||
Initialize a DockerProcess instance.
|
||
|
||
**Arguments**:
|
||
|
||
- `id` _int_ - The identifier of the command.
|
||
- `command` _str_ - The command to be executed.
|
||
- `result` - The result of the command execution.
|
||
- `pid` _int_ - The process ID (PID) of the command.
|
||
|
||
#### parse\_docker\_exec\_output
|
||
|
||
```python
|
||
def parse_docker_exec_output(logs: bytes) -> Tuple[bytes, bytes]
|
||
```
|
||
|
||
When you execute a command using `exec` in a docker container, the output produced will be in bytes. this function parses the output of a Docker exec command.
|
||
|
||
**Example**:
|
||
|
||
Considering you have a docker container named `my_container` up and running
|
||
$ docker exec my_container echo "Hello OpenDevin!"
|
||
>> b' |