Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/swerex/deployment/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class DockerDeploymentConfig(BaseModel):
"""The container runtime to use (docker or podman)."""
exec_shell: list[str] = ["/bin/sh", "-c"]
"""The shell executable and arguments to use for running commands."""
docker_internal_host: str = "http://127.0.0.1"
"""The host to use for connecting to the runtime."""

type: Literal["docker"] = "docker"
"""Discriminator for (de)serialization/CLI. Do not change."""
Expand Down
7 changes: 6 additions & 1 deletion src/swerex/deployment/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,12 @@ async def start(self):
self._hooks.on_custom_step("Starting runtime")
self.logger.info(f"Starting runtime at {self._config.port}")
self._runtime = RemoteRuntime.from_config(
RemoteRuntimeConfig(port=self._config.port, timeout=self._runtime_timeout, auth_token=token)
RemoteRuntimeConfig(
host=self._config.docker_internal_host,
port=self._config.port,
timeout=self._runtime_timeout,
auth_token=token,
)
)
t0 = time.time()
await self._wait_until_alive(timeout=self._config.startup_timeout)
Expand Down