Overview
This skill covers Grille's Docker module — 12 tools for container lifecycle management, log access, resource monitoring, and controlled command execution inside containers. Apply it whenever Claude needs to start, stop, inspect, or interact with Docker containers and Compose stacks on the local Windows machine.
Grille's Docker tools call the Docker CLI via subprocess (not the Docker Engine API directly). Docker Desktop must be running.
Tools
docker_ps— List containers with status, ports, and uptime.docker_logs— Fetch container log output. Supportstail(line count) parameter.docker_inspect— Full container details: image, mounts, network, health status, environment.docker_images— List local images with tag and size.docker_stats— CPU and memory snapshot for running containers.docker_start— Start a stopped container.docker_stop— Gracefully stop a running container.docker_compose_ps— Status of all services in a Compose project.docker_compose_up— Start Compose services (always detached).docker_compose_down— Stop and remove Compose services and networks.docker_compose_restart— Restart one or more Compose services without recreating them.docker_exec— Execute an allowlisted command inside a running container.
Patterns
Check container health before connecting:
1. grille:docker_ps ← confirm container is running
2. grille:docker_inspect ← check health status and port bindings
3. grille:sql_query or grille:ssh_run ← proceed with work
Bring up a Compose stack:
grille:docker_compose_up
project_dir="C:\\dev\\grille-demo"
services=["postgres", "api"] ← omit for all services
Tail recent logs for debugging:
grille:docker_logs
container="rekn-postgres"
tail=50
Execute a command inside a container:
grille:docker_exec
container="rekn-postgres"
command="psql"
args=["-U", "postgres", "-c", "SELECT count(*) FROM users;"]
Only the executable (command) is allowlist-checked. Args are unrestricted — complex
flags, -c "..." expressions, and multi-part arguments all work without any extra config.
Restart a single service after a config change:
grille:docker_compose_restart
project_dir="C:\\dev\\rekn"
services=["api"]
Constraints
- Do not use
$characters in passwords passed to Docker Compose. Docker Compose performs variable interpolation on$in.envfiles and inline values. A password likeP@ss$wordwill have$wordexpanded (likely to empty string), silently corrupting the credential. Use alphanumeric passwords in all Compose-managed environments. docker_execallowlist covers the executable only. Each container's permitted executables are configured ingrille.tomlunderdocker_exec_allowed. Args are unrestricted — any flags or-c "..."expressions valid for that executable work as-is. Checkgrille.tomlorgrille_infofor configured allowlists.docker_compose_upalways runs detached. There is no interactive or attached mode. Log output is accessible viadocker_logsafter startup.- Do not attempt Docker Engine API calls directly. Grille's Docker module uses the Docker CLI (
docker.exe) via subprocess. A native Docker Engine API module is deferred pending demand. All current tools are CLI-backed. docker_stopis graceful — it sends SIGTERM and waits. For containers that are hung and not responding to SIGTERM, usedocker_inspectfirst to understand state. Forced kill is not exposed in v1.- Docker Desktop must be running. If Docker Desktop is not started, all docker_* calls will fail with a connection error. Check with
docker_psfirst.
Examples
Example 1: Verify the database is healthy before running migrations
grille:docker_ps
→ Confirm rekn-postgres is "Up X minutes (healthy)"
grille:docker_exec
container="rekn-postgres"
command="pg_isready"
args=["-U", "postgres"]
→ "localhost:5432 - accepting connections"
grille:sql_query
connection="rekn"
query="SELECT version()"
→ Proceed with migrations
Example 2: Debug a failing API container
grille:docker_compose_ps
project_dir="C:\\dev\\rekn"
→ Identify which service is in "Exit 1" state
grille:docker_logs
container="rekn-api"
tail=100
→ Read error output to diagnose
grille:docker_compose_restart
project_dir="C:\\dev\\rekn"
services=["api"]
→ Restart after fix