Skip to main content
Glama

Code MCP Server

by block

docker_run

Execute and manage Docker containers by specifying image, command, ports, volumes, and environment variables. Automate container operations with custom configurations and integrate into workflows.

Instructions

Run a Docker container

Input Schema

NameRequiredDescriptionDefault
argsNoCommand arguments
commandNoCommand to run in container
cpusNoCPU limit (e.g., "0.5", "2")
detachNoRun container in background
envNoEnvironment variables as key-value pairs
imageYesDocker image to run
interactiveNoKeep STDIN open
memoryNoMemory limit (e.g., "512m", "2g")
nameNoContainer name
networkNoNetwork to connect container to
portsNoPort mappings (e.g., ["8080:80", "3000:3000"])
removeNoRemove container when it exits
restartNoRestart policy (no, on-failure, always, unless-stopped)
ttyNoAllocate a pseudo-TTY
userNoUsername or UID (format: <name|uid>[:<group|gid>])
volumesNoVolume mounts (e.g., ["/host/path:/container/path"])
working_dirNoWorking directory inside container

Input Schema (JSON Schema)

{ "properties": { "args": { "description": "Command arguments", "items": { "type": "string" }, "type": "array" }, "command": { "description": "Command to run in container", "type": "string" }, "cpus": { "description": "CPU limit (e.g., \"0.5\", \"2\")", "type": "string" }, "detach": { "description": "Run container in background", "type": "boolean" }, "env": { "description": "Environment variables as key-value pairs", "type": "object" }, "image": { "description": "Docker image to run", "type": "string" }, "interactive": { "description": "Keep STDIN open", "type": "boolean" }, "memory": { "description": "Memory limit (e.g., \"512m\", \"2g\")", "type": "string" }, "name": { "description": "Container name", "type": "string" }, "network": { "description": "Network to connect container to", "type": "string" }, "ports": { "description": "Port mappings (e.g., [\"8080:80\", \"3000:3000\"])", "items": { "type": "string" }, "type": "array" }, "remove": { "description": "Remove container when it exits", "type": "boolean" }, "restart": { "description": "Restart policy (no, on-failure, always, unless-stopped)", "type": "string" }, "tty": { "description": "Allocate a pseudo-TTY", "type": "boolean" }, "user": { "description": "Username or UID (format: <name|uid>[:<group|gid>])", "type": "string" }, "volumes": { "description": "Volume mounts (e.g., [\"/host/path:/container/path\"])", "items": { "type": "string" }, "type": "array" }, "working_dir": { "description": "Working directory inside container", "type": "string" } }, "required": [ "image" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/block/vscode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server