DevOpsβ˜… 9.8k

Docker Container Management β€” Build, Run, Monitor & Debug

Manage Docker containers, images, volumes, and networks with natural language. Build, start, stop, inspect logs, exec into containers, and orchestrate multi-container stacks β€” all through conversation.

Why Docker MCP?

Stop memorizing Docker CLI flags. The Docker MCP lets OpenClaw manage your entire container lifecycle through natural language. Ask it to "spin up a Redis instance on port 6380" or "show me what's eating memory in the production stack" β€” it handles the rest.

  • Container Lifecycle: Create, start, stop, restart, remove containers. Manage resource limits and environment variables.
  • Image Management: Pull, build, tag, push images. Clean up unused images to free disk space.
  • Debugging: Stream container logs, exec into running containers, inspect network configs, check health status.
  • Compose Support: Start/stop entire docker-compose stacks, scale replicas, view cross-service logs.

Configuration

"mcpServers": {
  "docker": {
    "command": "npx",
    "args": ["-y", "@mcp/docker-server"],
    "env": {
      "DOCKER_HOST": "unix:///var/run/docker.sock"
    }
  }
}

Top Prompts

  1. "List all running containers and show which ones are using more than 500MB RAM."
  2. "Pull the latest postgres:16 image and start a container with persistent volume on port 5433."
  3. "Show me the last 100 lines of logs from the 'api-server' container β€” filter for errors only."
  4. "Build the Dockerfile in ./backend, tag as myapp:v2.1, and replace the running container with zero downtime."
  5. "Clean up all stopped containers, dangling images, and unused volumes to free disk space."

Security

Warning: Docker socket access grants near-root privileges. Use read-only mode for monitoring, or limit to specific containers with labels. Never expose Docker MCP on a network-facing agent without authentication.

$ cd ../* END_OF_FILE */