docker_run
Starts a new Docker container in the background with configurable image, ports, volumes, environment, and network; requires confirmation before running.
Instructions
Start a new container in the background (docker run -d). Needs confirm=true.
For anything that should stay, a compose stack (docker_stack_write) is better. ports like "8080:80" or "127.0.0.1:8080:80/tcp". volumes like "myvol:/data" or "/opt/stacks/app/data:/data:ro" (a host folder must be in an allowed folder). Not possible here: privileged mode, devices, the docker socket.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| host | No | ||
| name | No | ||
| user | No | ||
| image | Yes | ||
| ports | No | ||
| command | No | ||
| confirm | No | ||
| network | No | ||
| restart | No | unless-stopped | |
| volumes | No | ||
| workdir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |