mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-08 22:38:05 -05:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user