containerport
v0.1.0Run core Docker container operations: list, run, inspect, logs, images and volumes.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_containers
List Docker containers, optionally including stopped ones.
| Parameter | Type | Description |
|---|---|---|
all | boolean | When true, include stopped containers as well as running ones. |
inspect_container
Return the full inspect document for one Docker container.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | ID or name of the container to inspect. |
run_container
Run a new Docker container in detached mode from an image.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image to run the new container from, such as a name with an optional tag. |
command | string | Command to run inside the container, executed via the container's sh -c. |
env | array | Environment variables to set in the container, each in KEY=VALUE form, passed to docker run -e. |
name | string | Name to assign to the new container. |
ports | array | Port mappings to publish, each in host:container form, passed to docker run -p. |
start_container
Start a stopped Docker container.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | ID or name of the stopped container to start. |
stop_container
Stop a running Docker container.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | ID or name of the running container to stop. |
remove_container
Remove a Docker container, optionally forcing removal.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | ID or name of the container to remove. |
force | boolean | When true, force removal even if the container is running. |
list_images
List Docker images present on the host.
pull_image
Pull a Docker image from its registry.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image to pull from its registry, such as a name with an optional tag. |
get_container_logs
Fetch recent log output from a Docker container.
| Parameter | Type | Description |
|---|---|---|
container_id * | string | ID or name of the container to fetch logs from. |
tail | number | Number of lines to return from the end of the log output. |
list_volumes
List Docker volumes on the host.