run_container
Run Docker containers with specified configurations, including image, name, ports, volumes, environment variables, and commands. Integrates with the Docker MCP Server to manage containers efficiently.
Instructions
Run a Docker container
Input Schema
Name | Required | Description | Default |
---|---|---|---|
command | No | Command to run in the container | |
detach | No | Run container in background | |
env | No | Environment variables (e.g. ["KEY=value"]) | |
image | Yes | Docker image to run | |
name | No | Name for the container | |
ports | No | Port mappings (e.g. ["8080:80"]) | |
volumes | No | Volume mappings (e.g. ["/host/path:/container/path"]) |
Input Schema (JSON Schema)
{
"properties": {
"command": {
"description": "Command to run in the container",
"type": "string"
},
"detach": {
"description": "Run container in background",
"type": "boolean"
},
"env": {
"description": "Environment variables (e.g. [\"KEY=value\"])",
"items": {
"type": "string"
},
"type": "array"
},
"image": {
"description": "Docker image to run",
"type": "string"
},
"name": {
"description": "Name for the container",
"type": "string"
},
"ports": {
"description": "Port mappings (e.g. [\"8080:80\"])",
"items": {
"type": "string"
},
"type": "array"
},
"volumes": {
"description": "Volume mappings (e.g. [\"/host/path:/container/path\"])",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"image"
],
"type": "object"
}