recreate_container
Update a Docker container to a new image: stops the existing container, pulls the specified image, and starts a replacement container.
Instructions
Recreate a container with an updated image (stops old container, pulls new image, starts new container)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"environmentId": "<environmentId>",
"containerId": "<containerId>",
"image": "<image>"
},
"name": "recreate_container"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | New image to use (e.g., 'nginx:latest') | |
| containerId | Yes | Container ID or name | |
| environmentId | Yes | Portainer environment ID |