# Minimal offline bundle of the pentest-ai-agents definitions.
# This image ships Markdown agent definitions + helper scripts for offline/air-gapped
# use. It is NOT a tool runner and runs nothing offensive — it packages files.
#
# Base pinned by digest (immutable). Refresh with:
#   curl -sI -H "Authorization: Bearer $(curl -s 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/debian:pull' | sed -n 's/.*"token":"\([^"]*\)".*/\1/p')" \
#     -H 'Accept: application/vnd.oci.image.index.v1+json' \
#     https://registry-1.docker.io/v2/library/debian/manifests/bookworm-slim | grep -i docker-content-digest
FROM debian:bookworm-slim@sha256:96e378d7e6531ac9a15ad505478fcc2e69f371b10f5cdf87857c4b8188404716

LABEL org.opencontainers.image.source="https://github.com/0xSteph/pentest-ai-agents" \
      org.opencontainers.image.description="Claude Code pentest subagent definitions (offline bundle)" \
      org.opencontainers.image.licenses="MIT"

# Non-root; no package installs needed for a Markdown/scripts bundle.
RUN useradd --create-home --uid 10001 agents
USER agents
WORKDIR /home/agents/pentest-ai-agents

# COPY only what ships (see .dockerignore for what's kept out of the context).
COPY --chown=agents:agents agents/ ./agents/
COPY --chown=agents:agents commands/ ./commands/
COPY --chown=agents:agents .claude-plugin/ ./.claude-plugin/
COPY --chown=agents:agents db/ ./db/
COPY --chown=agents:agents examples/ ./examples/
COPY --chown=agents:agents install.sh README.md INSTALL.md LICENSE VERSION ./

# The image is a bundle, not a server. Default: print how to use it.
CMD ["sh", "-c", "echo 'pentest-ai-agents offline bundle.'; echo 'Agents:  agents/   (50 routable + _scope-guard)'; echo 'Install: ./install.sh --global   |   See INSTALL.md'"]
