mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: update docker logs command to conditionally include raw flag for swarm
This commit is contained in:
@@ -54,7 +54,9 @@ export const setupDockerContainerLogsWebSocketServer = (
|
|||||||
const client = new Client();
|
const client = new Client();
|
||||||
client
|
client
|
||||||
.once("ready", () => {
|
.once("ready", () => {
|
||||||
const baseCommand = `docker ${runType === "swarm" ? "service" : "container"} logs --timestamps --tail ${tail} ${
|
const baseCommand = `docker ${runType === "swarm" ? "service" : "container"} logs --timestamps ${
|
||||||
|
runType === "swarm" ? "--raw" : ""
|
||||||
|
} --tail ${tail} ${
|
||||||
since === "all" ? "" : `--since ${since}`
|
since === "all" ? "" : `--since ${since}`
|
||||||
} --follow ${containerId}`;
|
} --follow ${containerId}`;
|
||||||
const escapedSearch = search ? search.replace(/'/g, "'\\''") : "";
|
const escapedSearch = search ? search.replace(/'/g, "'\\''") : "";
|
||||||
@@ -98,7 +100,9 @@ export const setupDockerContainerLogsWebSocketServer = (
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const shell = getShell();
|
const shell = getShell();
|
||||||
const baseCommand = `docker ${runType === "swarm" ? "service" : "container"} logs --timestamps --tail ${tail} ${
|
const baseCommand = `docker ${runType === "swarm" ? "service" : "container"} logs --timestamps ${
|
||||||
|
runType === "swarm" ? "--raw" : ""
|
||||||
|
} --tail ${tail} ${
|
||||||
since === "all" ? "" : `--since ${since}`
|
since === "all" ? "" : `--since ${since}`
|
||||||
} --follow ${containerId}`;
|
} --follow ${containerId}`;
|
||||||
const command = search
|
const command = search
|
||||||
|
|||||||
Reference in New Issue
Block a user