Skip to content

Commit 9809a71

Browse files
committed
re-surface docker url
1 parent 32e21c6 commit 9809a71

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎rlm/environments/docker_repl.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,13 @@ def setup(self):
505505
"max_concurrent_subcalls": self.max_concurrent_subcalls,
506506
},
507507
)
508-
self.proxy_server = ThreadingHTTPServer(("127.0.0.1", 0), handler)
508+
# Bind on all interfaces so the container can reach the proxy via
509+
# host.docker.internal. On macOS/Docker Desktop loopback works, but on
510+
# native Linux host.docker.internal resolves to the bridge gateway IP
511+
# (e.g. 172.17.0.1), which cannot reach a server bound to 127.0.0.1 -
512+
# the connection is refused. The port is an ephemeral, short-lived one
513+
# serving only LM/RLM proxy calls for this env's container.
514+
self.proxy_server = ThreadingHTTPServer(("0.0.0.0", 0), handler)
509515
self.proxy_server.daemon_threads = True
510516
# Store the address on the server so handlers read it live; this is what
511517
# makes update_handler_address work across persistent multi-turn calls.

0 commit comments

Comments
 (0)