Containerize and deploy a lab plugin using Docker and Docker Compose. Use when the user wants to create or update a Dockerfile, docker-compose.yaml, entrypoint.sh, or health endpoint; audit an existing container config for drift; or plan a deploy strategy for a plugin. Trigger phrases include "Dockerize my Rust plugin", "containerize my Python MCP server", "set up Compose for my TypeScript plugin".
From plugin-labnpx claudepluginhub jmagar/claude-homelab --plugin plugin-labThis skill uses the workspace's default tool permissions.
references/compose-healthcheck.mdreferences/dockerfile-patterns.mdProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Calculates TAM/SAM/SOM using top-down, bottom-up, and value theory methodologies for market sizing, revenue estimation, and startup validation.
Produce canonical Docker and Docker Compose configuration for a lab plugin.
When the user omits details, apply these defaults without asking:
8080 (override only if the user specifies a different port)env_file: .env in the Compose service stanzainterval: 30s, timeout: 10s, retries: 3, start_period: 10sCargo.toml → Rust, pyproject.toml/setup.py → Python, package.json → TypeScript/Node)If a required input cannot be inferred (e.g., the plugin name or the list of required env vars), ask before generating files.
A conforming plugin container:
/health endpoint on the plugin's HTTP port returning HTTP 200entrypoint.sh that validates every variable in .env.example before starting the serverdocker-compose.yaml with env_file, named volume mounts, and a healthcheck directive.dockerignore that excludes .env, dev artifacts, and test dataUse the correct canonical template base for the target language:
~/workspace/plugin-templates/py/~/workspace/plugin-templates/rs/~/workspace/plugin-templates/ts/Specialize the template with the plugin's package name, binary or module entrypoint, correct port, required env var names, and any extra system packages needed at runtime. Do not invent new layer ordering or USER patterns outside what the template establishes.
Before writing container files, confirm or infer:
.env.exampleCheck for these common drift patterns:
USER root in the runtime stagehealthcheck in Compose/health endpoint absent or not returning HTTP 200.env referenced via inline environment: block instead of env_file:.dockerignore or patterns that are too broad (e.g., * ignoring everything)entrypoint.sh that does not validate all vars from .env.exampleProduce a findings list with file references before making any changes.
When modifying an existing config:
entrypoint.sh still validates all env vars after any .env.example additionsjust build && just up before considering completeStandard homelab deploy workflow:
.env on the host — never committed to gitdocker compose pull
docker compose up -d
To roll back to a prior release, pin the previous image tag in docker-compose.yaml and redeploy:
# docker-compose.yaml — pin to prior tag to roll back
services:
my-plugin:
image: ghcr.io/owner/my-plugin:1.2.3 # was: 1.3.0
Then apply:
docker compose up -d
The running container is replaced with the pinned version. No scale-to-zero step is needed. After confirming the rollback is stable, either fix forward and cut a new release, or update the pinned tag to the correct prior version permanently.
To confirm the rollback succeeded:
docker compose ps
docker compose logs my-plugin --tail 50
curl -sf http://localhost:8080/health
At minimum, produce:
Dockerfile — multi-stage, non-root runtime stageentrypoint.sh — validates all vars from .env.example, then execs the serverdocker-compose.yaml — service with env_file, healthcheck, correct port.dockerignore — excludes .env, dev artifacts, test data/health endpoint in server codeAfter generating or updating container files:
# Validate Compose config parses cleanly
docker compose config --quiet
# Check shell syntax on entrypoint
bash -n entrypoint.sh
# Build the image locally
just build
# Start and confirm health
just up
curl -sf http://localhost:8080/health && echo "healthy"
# Check logs for startup errors
docker compose logs my-plugin --tail 50