Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/phazurlabs/install-labs/docker-agent-packagingnpx skills add phazurlabs/install-labs --skill docker-agent-packaginggit clone --depth 1 https://github.com/phazurlabs/install-labsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/phazurlabs/install-labs/docker-agent-packaging)<a href="https://agentmods.dev/skills/phazurlabs/install-labs/docker-agent-packaging"><img src="https://agentmods.dev/badge/skills/phazurlabs/install-labs/docker-agent-packaging.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00096 | $0.06639 |
| Opus 5 | $0.00048 | $0.03320 |
| Sonnet 5 | $0.00019 | $0.01328 |
| Haiku 4.5 | $0.00010 | $0.00664 |
Grade C, and why
docker-agent-packaging scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf /var/lib/apt/lists/* Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
apt-get install -y --no-install-recommends libpq5 curl && \ How it starts
The opening of the file, as written. The whole thing — 820 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docker Agent Packaging
When to Use Docker for Agents
Docker is the right choice when your agent has requirements that exceed what a simple package manager can handle. Use this decision framework:
| Situation | Use Docker? | Why |
|---|---|---|
| Complex ML dependencies (PyTorch, transformers, CUDA) | Yes | Reproducible environment eliminates "works on my GPU" |
| Multi-service architecture (agent + vector store + DB) | Yes | Compose orchestrates the full stack in one command |
| Server-side agent (API endpoint, webhook handler) | Yes | Standard deployment target for every cloud platform |
| GPU inference required | Yes | nvidia-container-toolkit provides clean GPU passthrough |
| Team needs identical dev environments | Yes | Dev containers eliminate onboarding friction |
| Simple CLI tool with few deps | No | Use a single binary (Go/Rust) or uvx/npx |
| Agent is just an MCP server | No | Use npm/PyPI; MCP clients handle lifecycle |
| Users are non-technical without Docker installed | No | Docker itself is a prerequisite most non-devs don't have |
| Lightweight Python script calling APIs | No | pip install or uvx is faster with zero overhead |
Rule of thumb: if your agent needs more than one process or has dependencies that fight each other across machines, Docker is the answer. If it is a single-process CLI tool, Docker adds overhead without value.
Dockerfile for Python AI Agents
Multi-stage builds keep your runtime image small by separating build-time tools from the final artifact.
# =============================================================================
# Stage 1: Build — install dependencies in an isolated layer
# =============================================================================
FROM python:3.12-slim AS builder
# Prevent Python from writing .pyc files and enable unbuffered output
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# Install system-level build dependencies (removed in runtime stage)
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc libpq-dev && \
rm -rf /var/lib/apt/lists/*
# Copy dependency manifest first (layer caching: deps change less than code)
COPY requirements.txt .
# Install Python dependencies into a virtual environment
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir -r requirements.txt
# =============================================================================
# Stage 2: Runtime — minimal image with only what's needed to run
# =============================================================================
FROM python:3.12-slim AS runtime
# Runtime system deps only (no compiler)
RUN apt-get update && \
apt-get install -y --no-install-recommends libpq5 curl && \
rm -rf /var/lib/apt/lists/*
# Create non-root user (never run agents as root)
RUN groupadd --gid 1000 agent && \
useradd --uid 1000 --gid agent --shell /bin/bash --create-home agent
WORKDIR /app
# Copy virtual environment from builder
COPY --from=builder /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Copy application source
COPY --chown=agent:agent . .
# Switch to non-root user
USER agent
# Expose the agent's API port (change to match your agent)
EXPOSE 8000
# Health check — container orchestrators use this to know if agent is alive
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# API keys are NEVER baked into the image — pass at runtime via -e or .env
# ENV ANTHROPIC_API_KEY= (do NOT set a default value)
# Start the agent
CMD ["python", "-m", "my_agent.server"]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 820 lines · 96 tokens per session scan C 510458a3f059
docker-agent-packaging is a skill published in the GitHub repository phazurlabs/install-labs (3 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 96 tokens to every session and 6,639 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
promptscript
PromptScript language expert for reading, writing, modifying, and troubleshooting .prs files. Use when working with PromptScript syntax, creating or editing .prs files, adding blocks like @identity, @standards, @restrictions, @shortcuts, @skills, or @agents, configuring promptscript.yaml, resolving compilation errors…
tdd-workflow
Test-driven development workflow.
expert
Base expert skill.
alpha
Alpha skill.
local-ci-dev
Run local CI via the in-tree dev build of local-ci (pnpm local-ci-dev) to verify changes to this repo before completing work. Runs pnpm local-ci-dev run --all in the background, watches the log for step failures, and retries failed runners after fixes. Use before reporting work as complete, or whenever the user asks…
local-ci
Run GitHub Actions workflows locally with pause-on-failure for AI-agent-driven CI iteration.