bugscpp.processor.core.docker.Docker¶
- class Docker(dockerfile: str, worktree: processor.core.data.Worktree, environ: Optional[Dict[str, str]] = None, rebuild_image=False, user=None, uid_of_user: Optional[str] = None, verbose=True)[source]¶
Bases:
object
Provide docker SDK methods along with context manager. It is recommended to use this via with statement.
Examples
>>> with Docker("/path/to/Dockerfile", my_worktree) as docker: ... docker.send("echo 'Hello, world!'")
Notes
Host machine must be running docker daemon in background.
- __init__(dockerfile: str, worktree: processor.core.data.Worktree, environ: Optional[Dict[str, str]] = None, rebuild_image=False, user=None, uid_of_user: Optional[str] = None, verbose=True)[source]¶
Methods
__init__
(dockerfile, worktree[, environ, ...])send
(command[, stream])Send a single line command to the running container.
Attributes
Docker SDK client.
Docker SDK Image.
- client = <docker.client.DockerClient object>¶
Docker SDK client.
- property image: docker.models.images.Image¶
Docker SDK Image.