File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ class DockerDeploymentConfig(BaseModel):
4545 """The container runtime to use (docker or podman)."""
4646 exec_shell : list [str ] = ["/bin/sh" , "-c" ]
4747 """The shell executable and arguments to use for running commands."""
48+ docker_internal_host : str = "http://127.0.0.1"
49+ """The host to use for connecting to the runtime.
50+ In most cases you can leave this as-is, however for docker-in-docker
51+ setups you might have to set it to http://host.docker.internal/
52+ (see https://github.com/SWE-agent/SWE-ReX/issues/253 for more information).
53+ """
4854
4955 type : Literal ["docker" ] = "docker"
5056 """Discriminator for (de)serialization/CLI. Do not change."""
Original file line number Diff line number Diff line change @@ -271,7 +271,12 @@ async def start(self):
271271 self ._hooks .on_custom_step ("Starting runtime" )
272272 self .logger .info (f"Starting runtime at { self ._config .port } " )
273273 self ._runtime = RemoteRuntime .from_config (
274- RemoteRuntimeConfig (port = self ._config .port , timeout = self ._runtime_timeout , auth_token = token )
274+ RemoteRuntimeConfig (
275+ host = self ._config .docker_internal_host ,
276+ port = self ._config .port ,
277+ timeout = self ._runtime_timeout ,
278+ auth_token = token ,
279+ )
275280 )
276281 t0 = time .time ()
277282 await self ._wait_until_alive (timeout = self ._config .startup_timeout )
You can’t perform that action at this time.
0 commit comments