From de114ade15ee29c04029416477a7d8debbc5128f Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 15 Mar 2026 00:56:30 +0800 Subject: [PATCH] feat(docker): add relay daemon port mapping for container communication - Introduced a relay daemon port (2099/tcp) to facilitate communication between the host Tai server and containers. - Updated port bindings to ensure the relay port is always mapped to the host IP for improved connectivity. Made-with: Cursor --- tai/runtime/docker_core.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tai/runtime/docker_core.go b/tai/runtime/docker_core.go index 055387e2..26efe21d 100644 --- a/tai/runtime/docker_core.go +++ b/tai/runtime/docker_core.go @@ -52,6 +52,12 @@ func (d *dockerCore) create(ctx context.Context, opts CreateOptions, addVNCPorts }} } + // tai relay daemon port — always mapped so the host Tai server can + // forward arbitrary container ports through the relay. + relayPort := nat.Port("2099/tcp") + exposedPorts[relayPort] = struct{}{} + portBindings[relayPort] = []nat.PortBinding{{HostIP: "127.0.0.1", HostPort: ""}} + if opts.VNC { hostCfg.CapAdd = append(hostCfg.CapAdd, "SYS_ADMIN") shmSize := opts.Memory / 4