Merge pull request #2306 from Dokploy/2170-docker-compose-volume-mount-causes-oci-runtime-exec-failed-unless-container-is-force-recreated

refactor(docker): update docker exec command to set working directory…
This commit is contained in:
Mauricio Siu
2025-08-03 01:48:22 -06:00
committed by GitHub

View File

@@ -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}`],
{},
);