← All procedures

docker.inspect

Give the details of containers, images, volumes or networks: data has the JSON of docker

MCPCLI
Package
@procedures/docker · README
Path
["docker","inspect"]
CLI
mark docker inspect --targets <string[]>
MCP tool
docker.inspect on the dev-tools server
As data
{"$proc":["docker","inspect"],"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","inspect"], { targets: [] });
console.log(JSON.stringify(result));

From the command line

$ mark docker inspect --targets <string[]>

As data, in a program

{ "$proc": ["docker", "inspect"], "input": { "targets": [] } }

Input

FieldTypeRequiredDefaultDescription
targetsstring[]yesThe names or the IDs of the objects
type"container" | "image" | "volume" | "network"noThe type of the objects (default: any type)
formatstringnoA Go template for the output. Without it, the output is JSON, and data has it
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
dataanynoThe parsed JSON of docker: one object for each target
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "targets": {
        "minItems": 1,
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The names or the IDs of the objects"
      },
      "type": {
        "description": "The type of the objects (default: any type)",
        "type": "string",
        "enum": [
          "container",
          "image",
          "volume",
          "network"
        ]
      },
      "format": {
        "description": "A Go template for the output. Without it, the output is JSON, and data has it",
        "type": "string"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      },
      "timeout": {
        "description": "Timeout in milliseconds",
        "type": "number"
      }
    },
    "required": [
      "targets"
    ]
  },
  "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"
      },
      "data": {
        "description": "The parsed JSON of docker: one object for each target"
      }
    },
    "required": [
      "exitCode",
      "stdout",
      "stderr",
      "success",
      "duration"
    ],
    "additionalProperties": {}
  }
}