← All procedures

docker.compose.logs

Get the logs of the services of a compose project (without follow)

MCPCLI
Package
@procedures/docker · README
Path
["docker","compose","logs"]
CLI
mark docker compose logs
MCP tool
docker.compose.logs on the dev-tools server
As data
{"$proc":["docker","compose","logs"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/docker/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["docker","compose","logs"], {});
console.log(JSON.stringify(result));

From the command line

$ mark docker compose logs

As data, in a program

{ "$proc": ["docker", "compose", "logs"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
filestringnoCompose file path
servicesstring[]noThe services (default: all)
tailintegernoThe number of lines from the end of each log
sincestringnoOnly the logs after this time, for example 10m or 2026-10-16T10:00:00
timestampsbooleannoShow timestamps
cwdstringnoWorking directory
timeoutnumbernoTimeout in milliseconds

Output

FieldTypeRequiredDefaultDescription
exitCodenumberyesThe exit code of docker (0 is success)
stdoutstringyesThe standard output of docker
stderrstringyesThe standard error of docker, or the error message when docker did not start
successbooleanyesTrue when the exit code is 0
durationnumberyesThe time of the command, in milliseconds
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "file": {
        "description": "Compose file path",
        "type": "string"
      },
      "services": {
        "description": "The services (default: all)",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "tail": {
        "description": "The number of lines from the end of each log",
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "since": {
        "description": "Only the logs after this time, for example 10m or 2026-10-16T10:00:00",
        "type": "string"
      },
      "timestamps": {
        "description": "Show timestamps",
        "type": "boolean"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      },
      "timeout": {
        "description": "Timeout in milliseconds",
        "type": "number"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "exitCode": {
        "type": "number",
        "description": "The exit code of docker (0 is success)"
      },
      "stdout": {
        "type": "string",
        "description": "The standard output of docker"
      },
      "stderr": {
        "type": "string",
        "description": "The standard error of docker, or the error message when docker did not start"
      },
      "success": {
        "type": "boolean",
        "description": "True when the exit code is 0"
      },
      "duration": {
        "type": "number",
        "description": "The time of the command, in milliseconds"
      }
    },
    "required": [
      "exitCode",
      "stdout",
      "stderr",
      "success",
      "duration"
    ],
    "additionalProperties": {}
  }
}