Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 2e212a7

Browse files
authored
fix magic host issue (#516)
2 parents a8f2bc1 + d635599 commit 2e212a7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

taskweaver/ces/environment.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ def start_session(
269269
f"{new_port_start + 3}/tcp": None,
270270
f"{new_port_start + 4}/tcp": None,
271271
},
272+
# Block access to host's localhost via "magic domains" in Docker Desktop,
273+
# Podman, and Containerd on Lima (macOS/Windows) to prevent container escape
274+
extra_hosts={
275+
"host.docker.internal": "0.0.0.0",
276+
"host.containers.internal": "0.0.0.0",
277+
"host.lima.internal": "0.0.0.0",
278+
},
272279
)
273280

274281
tick = 0

0 commit comments

Comments
 (0)