refactor(docker): update docker exec command to set working directory for terminal sessions

This commit is contained in:
Mauricio Siu
2025-08-03 01:47:31 -06:00
parent e2d6b5eb8a
commit 32f61b5e9b
@@ -55,7 +55,7 @@ export const setupDockerContainerTerminalWebSocketServer = (
conn conn
.once("ready", () => { .once("ready", () => {
conn.exec( conn.exec(
`docker exec -it ${containerId} ${activeWay}`, `docker exec -it -w / ${containerId} ${activeWay}`,
{ pty: true }, { pty: true },
(err, stream) => { (err, stream) => {
if (err) throw err; if (err) throw err;
@@ -107,7 +107,7 @@ export const setupDockerContainerTerminalWebSocketServer = (
const shell = getShell(); const shell = getShell();
const ptyProcess = spawn( const ptyProcess = spawn(
shell, shell,
["-c", `docker exec -it ${containerId} ${activeWay}`], ["-c", `docker exec -it -w / ${containerId} ${activeWay}`],
{}, {},
); );