The Docker operations could be better abstracted into a dedicated class:
class DockerManager:
def __init__(self, workspace: str):
self.workspace = workspace
def ensure_container_running(self) -> bool:
"""Ensure the tiny42 container is running."""
pass
def execute_command(self, command: str) -> None:
"""Execute a command in the container."""
pass
def rebuild_container(self) -> None:
"""Rebuild the container from scratch."""
pass
The Docker operations could be better abstracted into a dedicated class: