mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-16 04:35:24 +02:00
refactor(docker): update docker exec command to set working directory for terminal sessions
This commit is contained in:
@@ -55,7 +55,7 @@ export const setupDockerContainerTerminalWebSocketServer = (
|
||||
conn
|
||||
.once("ready", () => {
|
||||
conn.exec(
|
||||
`docker exec -it ${containerId} ${activeWay}`,
|
||||
`docker exec -it -w / ${containerId} ${activeWay}`,
|
||||
{ pty: true },
|
||||
(err, stream) => {
|
||||
if (err) throw err;
|
||||
@@ -107,7 +107,7 @@ export const setupDockerContainerTerminalWebSocketServer = (
|
||||
const shell = getShell();
|
||||
const ptyProcess = spawn(
|
||||
shell,
|
||||
["-c", `docker exec -it ${containerId} ${activeWay}`],
|
||||
["-c", `docker exec -it -w / ${containerId} ${activeWay}`],
|
||||
{},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user