Fix WebSocket localhost bug by passing DOCKER_HOST_ADDR to runtime containers (#12113)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
shanemort1982 2025-12-24 21:26:45 +00:00 committed by GitHub
parent fe1026ee8a
commit 5407ea55aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -472,6 +472,9 @@ class DockerRuntime(ActionExecutionClient):
)
if self.config.debug or DEBUG:
environment['DEBUG'] = 'true'
# Pass DOCKER_HOST_ADDR to spawned containers if it exists
if os.environ.get('DOCKER_HOST_ADDR'):
environment['DOCKER_HOST_ADDR'] = os.environ['DOCKER_HOST_ADDR']
# also update with runtime_startup_env_vars
environment.update(self.config.sandbox.runtime_startup_env_vars)