mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 05:25:18 +00: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
|
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}`],
|
||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user