Docker Socket Proxy
Manages Docker containers via the tecnativa/docker-socket-proxy REST API using curl and jq. Which modes are available depends on which API sections the proxy instance has enabled.
Trigger conditions
- User asks to list, start, stop, restart, kill, pause, or unpause a container or service
- User wants container logs, stats, top processes, or filesystem changes
- User asks about Docker images, networks, volumes, swarm services, or tasks
- A service needs to be restarted after a config change
Usage
bash {baseDir}/scripts/run-docker.sh <mode> [args...]
Run with no arguments for full usage. Proxy URL is resolved from $DOCKER_PROXY_URL → $DOCKER_HOST (tcp→http) → http://localhost:2375.
Modes
System
| Mode |
Description |
ping |
Health check |
version |
Docker version |
info |
Host summary (containers, memory, etc.) |
events [--since T] [--until T] [--filters k=v] |
Recent events (1s window) |
system-df |
Disk usage by images/containers/volumes |
Containers
| Mode |
Description |
list |
Running containers |
list-all |
All containers including stopped |
inspect <name> |
Full container details |
top <name> [ps-args] |
Running processes inside container |
logs <name> [tail] |
Container logs (default tail=100) |
stats <name> |
CPU, memory, network, block I/O |
changes <name> |
Filesystem changes since start |
start <name> |
Start container |
stop <name> [timeout] |
Stop container |
restart <name> [timeout] |
Restart container |
kill <name> [signal] |
Kill container (default SIGKILL) |
pause <name> |
Pause container |
unpause <name> |
Unpause container |
rename <name> <new-name> |
Rename container |
exec <name> <cmd> [args...] |
Run command in container |
prune-containers |
Remove stopped containers |
Images
| Mode |
Description |
images |
List images |
image-inspect <name> |
Image details |
image-history <name> |
Layer history |
prune-images |
Remove unused images |
Networks
| Mode |
Description |
networks |
List networks |
network-inspect <name> |
Network details and connected containers |
prune-networks |
Remove unused networks |
Volumes
| Mode |
Description |
volumes |
List volumes |
volume-inspect <name> |
Volume details |
prune-volumes |
Remove unused volumes |
Swarm
| Mode |
Description |
swarm |
Swarm info |
nodes |
List nodes |
node-inspect <name> |
Node details |
services |
List services |
service-inspect <name> |
Service details |
service-logs <name> [tail] |
Service logs |
tasks |
List tasks |
configs |
List configs |
secrets |
List secrets |
Plugins
| Mode |
Description |
plugins |
List plugins |
Name matching
Container names can be partial — myapp matches project-myapp-1. Exact match is tried first, then substring. Errors clearly if 0 or 2+ containers match.
Notes
- Modes that require disabled proxy sections (e.g.
IMAGES, NETWORKS, VOLUMES, SYSTEM) will return HTTP 403. This is expected — enable the relevant env var on the proxy to unlock them.
exec is two-step (create + start) and streams multiplexed output.
events uses a 1-second window by default; use --since / --until to adjust.
1---2name: case-008703description: Docker Socket Proxy4---56# Docker Socket Proxy78Manages Docker containers via the `tecnativa/docker-socket-proxy` REST API using `curl` and `jq`. Which modes are available depends on which API sections the proxy instance has enabled.910## Trigger conditions1112- User asks to list, start, stop, restart, kill, pause, or unpause a container or service13- User wants container logs, stats, top processes, or filesystem changes14- User asks about Docker images, networks, volumes, swarm services, or tasks15- A service needs to be restarted after a config change1617## Usage1819```20bash {baseDir}/scripts/run-docker.sh <mode> [args...]21```2223Run with no arguments for full usage. Proxy URL is resolved from `$DOCKER_PROXY_URL` → `$DOCKER_HOST` (tcp→http) → `http://localhost:2375`.2425## Modes2627### System28| Mode | Description |29|------|-------------|30| `ping` | Health check |31| `version` | Docker version |32| `info` | Host summary (containers, memory, etc.) |33| `events [--since T] [--until T] [--filters k=v]` | Recent events (1s window) |34| `system-df` | Disk usage by images/containers/volumes |3536### Containers37| Mode | Description |38|------|-------------|39| `list` | Running containers |40| `list-all` | All containers including stopped |41| `inspect <name>` | Full container details |42| `top <name> [ps-args]` | Running processes inside container |43| `logs <name> [tail]` | Container logs (default tail=100) |44| `stats <name>` | CPU, memory, network, block I/O |45| `changes <name>` | Filesystem changes since start |46| `start <name>` | Start container |47| `stop <name> [timeout]` | Stop container |48| `restart <name> [timeout]` | Restart container |49| `kill <name> [signal]` | Kill container (default SIGKILL) |50| `pause <name>` | Pause container |51| `unpause <name>` | Unpause container |52| `rename <name> <new-name>` | Rename container |53| `exec <name> <cmd> [args...]` | Run command in container |54| `prune-containers` | Remove stopped containers |5556### Images57| Mode | Description |58|------|-------------|59| `images` | List images |60| `image-inspect <name>` | Image details |61| `image-history <name>` | Layer history |62| `prune-images` | Remove unused images |6364### Networks65| Mode | Description |66|------|-------------|67| `networks` | List networks |68| `network-inspect <name>` | Network details and connected containers |69| `prune-networks` | Remove unused networks |7071### Volumes72| Mode | Description |73|------|-------------|74| `volumes` | List volumes |75| `volume-inspect <name>` | Volume details |76| `prune-volumes` | Remove unused volumes |7778### Swarm79| Mode | Description |80|------|-------------|81| `swarm` | Swarm info |82| `nodes` | List nodes |83| `node-inspect <name>` | Node details |84| `services` | List services |85| `service-inspect <name>` | Service details |86| `service-logs <name> [tail]` | Service logs |87| `tasks` | List tasks |88| `configs` | List configs |89| `secrets` | List secrets |9091### Plugins92| Mode | Description |93|------|-------------|94| `plugins` | List plugins |9596## Name matching9798Container names can be partial — `myapp` matches `project-myapp-1`. Exact match is tried first, then substring. Errors clearly if 0 or 2+ containers match.99100## Notes101102- Modes that require disabled proxy sections (e.g. `IMAGES`, `NETWORKS`, `VOLUMES`, `SYSTEM`) will return HTTP 403. This is expected — enable the relevant env var on the proxy to unlock them.103- `exec` is two-step (create + start) and streams multiplexed output.104- `events` uses a 1-second window by default; use `--since` / `--until` to adjust.