docker

v1.0.1
io.github.rog0x/docker Checked 5 hours ago Published 8 months ago

Docker container management and Dockerfile analysis

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

docker_container_list

List Docker containers with status, ports, image, created time, and resource usage. Can show only running containers or all containers including stopped ones.

ParameterTypeDescription
allbooleanIf true, show all containers including stopped ones. Defaults to false (running only).
formatstringOutput format: 'table' for readable text, 'json' for structured data. Defaults to 'json'.

docker_image_list

List Docker images with size, tags, created date, and layer count. Optionally filter by repository name.

ParameterTypeDescription
filterstringFilter images by repository name (partial match). Leave empty to list all.
formatstringOutput format: 'table' or 'json'. Defaults to 'json'.
showDanglingbooleanInclude dangling (untagged) images. Defaults to false.

docker_dockerfile_analyze

Analyze a Dockerfile for best practices including multi-stage builds, non-root user, .dockerignore usage, layer caching order, image size optimization, and security.

ParameterTypeDescription
content *stringThe full content of the Dockerfile to analyze.
checkDockerignorebooleanIf true, also checks for common .dockerignore recommendations. Defaults to true.

docker_compose_analyze

Analyze docker-compose.yml: list services, ports, volumes, networks, health checks, dependencies. Suggest improvements.

ParameterTypeDescription
content *stringThe full content of the docker-compose.yml to analyze.

docker_container_logs

Get logs from a Docker container. Supports retrieving the last N lines, filtering by keyword, and including timestamps.

ParameterTypeDescription
container *stringContainer name or ID to get logs from.
filterstringFilter log lines to only include those containing this keyword (case-insensitive).
sincestringShow logs since a timestamp (e.g., '2024-01-01T00:00:00') or relative duration (e.g., '1h', '30m').
tailnumberNumber of lines to retrieve from the end of logs. Defaults to 100.
timestampsbooleanInclude timestamps in log output. Defaults to true.
untilstringShow logs until a timestamp or relative duration.