docker_exec console: wrap exec command in while-true loop so sr_cli restarts on quit

This commit is contained in:
YueGuobin 2026-08-12 22:07:03 +08:00
parent 486178d05c
commit 511c52330b
No known key found for this signature in database

View File

@ -1025,7 +1025,7 @@ class DockerVM(BaseNode):
"Tty": True,
"User": "root",
"Env": ["TERM=xterm"],
"Cmd": shlex.split(command),
"Cmd": ["sh", "-c", f"while true; do {command}; done"],
},
)
srv._exec_id = result["Id"]