agentsclimarketplace

Docker

Skill PIXARTSeu/Synapse/packages/codegraph/data/skill/docker

Docker MCP - gestione container Coolify, debug log, ispezione deployment, monitor risorse. Use when inspecting containers, debugging deployments, reading logs, or monitoring resource usage via Docker MCP.From its SKILL.md

Install
npx -y skills add PIXARTSeu/Synapse --skill docker

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.3 KB, ~2.1k tokens by cl100k_base, as published. Nobody here has run it

Docker MCP Skill

MCP Server

Docker MCP Gateway — Accesso diretto al Docker daemon tramite Docker Desktop (v4.43+). Gestisce container, immagini, log e stats.

Attivazione

Richiede Docker Desktop installato e attivo sulla macchina locale. Il MCP si connette al socket Docker locale.

"docker": {
  "type": "local",
  "command": ["docker", "mcp", "gateway", "run", "docker"],
  "enabled": true
}

Tool MCP Principali

list_containers — Lista container

list_containers(all: false)   // solo running
list_containers(all: true)    // tutti (inclusi stopped/exited)

// Con filtri:
list_containers(filters: { "status": ["exited"] })
list_containers(filters: { "name": ["pixarts-"] })

get_logs — Leggi log container

get_logs(container_id: "abc123def456")
get_logs(container_name: "app-nome-progetto")
get_logs(container_id: "abc123", tail: 100)        // ultimi 100 righe
get_logs(container_id: "abc123", since: "2026-01-01T00:00:00Z")

inspect_container — Ispezione completa

inspect_container(container_id: "abc123")
// Restituisce: Config, NetworkSettings, Mounts, State, Env vars, Labels

stats — Risorse in real-time

stats(container_id: "abc123")
// Restituisce: CPU%, Memory usage/limit, Network I/O, Block I/O

exec_run — Esegui comando nel container (solo diagnosi)

exec_run(container_id: "abc123", command: ["node", "--version"])
exec_run(container_id: "abc123", command: ["ls", "-la", "/app"])
exec_run(container_id: "abc123", command: ["cat", "/app/.env.local"])
exec_run(container_id: "abc123", command: ["wget", "-q", "-O-", "http://localhost:3000/api/health"])

list_images — Lista immagini

list_images()
list_images(filters: { "dangling": ["true"] })  // immagini orfane

image_history — Layer history

image_history(image: "sha256:abc...")

Stack Coolify — Context

I container Coolify seguono questi pattern:

AspettoPattern
Container name{uuid-applicazione} o {nome-servizio}
NetworkingTraefik come reverse proxy
Labelstraefik.enable=true, traefik.http.routers.*
Restart policyunless-stopped
Volumes/data/coolify/applications/{uuid}/
RegistryGitHub Container Registry (ghcr.io)

Workflow Debug Standard

1. Container non parte dopo deploy

Step 1: list_containers(all: true, filters: { "name": ["nome-progetto"] })
         → Trova container, nota status (exited? created? restarting?)

Step 2: get_logs(container_id, tail: 150)
         → Leggi gli ultimi log — il problema è quasi sempre qui

Step 3: inspect_container(container_id)
         → Controlla: Env vars presenti? Command corretto? Porte configurate?

Step 4: Diagnosi comune:
         - "MODULE_NOT_FOUND" → npm build incompleto, riesegui build
         - "EADDRINUSE" → porta già in uso da altro container
         - "Cannot find module" → dipendenza mancante o path errato
         - "Invalid environment variable" → ENV var mancante o malformata

2. Container running ma sito non risponde (502/504)

Step 1: list_containers → verifica che il container sia "running" non "restarting"
Step 2: stats(container_id) → memoria > 80%? CPU spike?
Step 3: get_logs → cerca crash loop, OOM killer, errori runtime
Step 4: exec_run(["wget", "-q", "-O-", "http://localhost:3000/api/health"])
         → Testa l'health endpoint dall'interno del container
Step 5: inspect_container → verifica labels Traefik correttamente configurate

3. Container lento / OOM

Step 1: stats(container_id) → controlla Memory usage vs limit
Step 2: Se memory > 80% del limit:
         - Aumento limite in Coolify: Settings → Resources → Memory
         - Oppure ottimizza next.config.ts (experimental.serverMemoryOptimizations)
Step 3: get_logs → cerca "heap out of memory", "SIGKILL", "Killed"
Step 4: Se CPU spike persistente:
         - exec_run(["node", "-e", "process.memoryUsage()"])
         - Controlla bundle size con Next.js analyzer

4. Verifica post-deploy (routine)

Step 1: list_containers → container running? da quanto tempo?
Step 2: stats → stabile (non spike continui)
Step 3: exec_run(["wget", "-q", "-O-", "http://localhost:3000/api/health"])
         → Risposta attesa: {"status":"ok","timestamp":"..."}
Step 4: get_logs(tail: 30) → nessun errore nei log recenti
Step 5: ✅ Deploy confermato sano

5. Pulizia immagini orfane

list_images(filters: { "dangling": ["true"] })
→ Mostra immagini non tagggate che occupano spazio
→ Segnala a devops-engineer per cleanup con: docker image prune

Dockerfile Next.js Standard (Coolify-Ready)

# Stage 1: Dependencies
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --only=production

# Stage 2: Builder
FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build

# Stage 3: Runner (minimal)
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
USER nextjs
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]

Coolify API (alternativa REST quando Docker MCP non disponibile)

BASE_URL: https://coolify.pixarts.eu  # oppure IP del VPS
API_KEY: {env:COOLIFY_API_KEY}

# Lista applicazioni
GET /api/v1/applications

# Trigger deploy manuale
GET /api/v1/deploy?uuid={app-uuid}&force=false

# Env vars dell'applicazione
GET /api/v1/applications/{uuid}/envs
POST /api/v1/applications/{uuid}/envs  # Aggiunge/modifica env var

# Logs (alternativa a Docker MCP)
GET /api/v1/applications/{uuid}/logs

Thresholds di Allarme

MetricaNormaleAttenzioneCritico
Memory usage< 60% limit60-80%> 80%
CPU (steady)< 20%20-50%> 50%
CPU (spike)spike brevi okspike > 2minspike > 10min
Restart count01-3> 3 in 1h
Container uptime> 24h< 1h (deploy recente)restarting loop

Best Practices

  1. Logs prima di tutto — Il 90% dei problemi si capisce dai log
  2. Mai stop/rm in prod — Solo inspect, logs, stats, exec per lettura
  3. exec solo per diagnosi — Comandi read-only: ls, node -v, cat, wget
  4. Escalation a @devops-engineer — Se serve modifica a Dockerfile o config Coolify
  5. Stats prima di restart — Documenta le stats prima di qualsiasi intervento
  6. Health check first — Verifica sempre /api/health come primo test

Integrazione con Agenti

AgenteQuando usa Docker MCP
@docker-managerDebug runtime, log inspection, health check
@devops-engineerBuild issues, Dockerfile optimization
@site-deployerVerifica post-deploy automatica
@site-qaConfirm container health prima di QA

What ships with it: 3 files

2.4 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.