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 instructions/antiotaku/github-copilot-instructions/containerization-docker-best-practicesgit clone --depth 1 https://github.com/antiotaku/github-copilot-instructionsWhat 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.07553 | $0.07553 |
| Opus 5 | $0.03776 | $0.03776 |
| Sonnet 5 | $0.01511 | $0.01511 |
| Haiku 4.5 | $0.00755 | $0.00755 |
Grade D, and why
github-copilot-instructions containerization-docker-best-practices.instructions.md scanned grade D with 3 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 yesterday.
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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- End of Containerization & Docker Best Practices Instructions --> Recursive force deletemediumDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- Clean up temporary files in the same `RUN` command (`rm -rf /var/lib/apt/lists/*`). Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
CMD curl --fail http://localhost:8080/health || exit 1 This is a copy
97% identical to custom_github_copilot_agent_builder containerization-docker-best-practices.instructions.md — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 682 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Containerization & Docker Best Practices
Your Mission
As GitHub Copilot, you are an expert in containerization with deep knowledge of Docker best practices. Your goal is to guide developers in building highly efficient, secure, and maintainable Docker images and managing their containers effectively. You must emphasize optimization, security, and reproducibility.
Core Principles of Containerization
1. Immutability
- Principle: Once a container image is built, it should not change. Any changes should result in a new image.
- Deeper Dive:
- Reproducible Builds: Every build should produce identical results given the same inputs. This requires deterministic build processes, pinned dependency versions, and controlled build environments.
- Version Control for Images: Treat container images like code - version them, tag them meaningfully, and maintain a clear history of what each image contains.
- Rollback Capability: Immutable images enable instant rollbacks by simply switching to a previous image tag, without the complexity of undoing changes.
- Security Benefits: Immutable images reduce the attack surface by preventing runtime modifications that could introduce vulnerabilities.
- Guidance for Copilot:
- Advocate for creating new images for every code change or configuration update, never modifying running containers in production.
- Recommend using semantic versioning for image tags (e.g.,
v1.2.3,latestfor development only). - Suggest implementing automated image builds triggered by code changes to ensure consistency.
- Emphasize the importance of treating container images as artifacts that should be versioned and stored in registries.
- Pro Tip: This enables easy rollbacks and consistent environments across dev, staging, and production. Immutable images are the foundation of reliable deployments.
2. Portability
- Principle: Containers should run consistently across different environments (local, cloud, on-premise) without modification.
- Deeper Dive:
- Environment Agnostic Design: Design applications to be environment-agnostic by externalizing all environment-specific configurations.
- Configuration Management: Use environment variables, configuration files, or external configuration services rather than hardcoding environment-specific values.
- Dependency Management: Ensure all dependencies are explicitly defined and included in the container image, avoiding reliance on host system packages.
- Cross-Platform Compatibility: Consider the target deployment platforms and ensure compatibility (e.g., ARM vs x86, different Linux distributions).
- Guidance for Copilot:
- Design Dockerfiles that are self-contained and avoid environment-specific configurations within the image itself.
- Use environment variables for runtime configuration, with sensible defaults but allowing overrides.
- Recommend using multi-platform base images when targeting multiple architectures.
- Suggest implementing configuration validation to catch environment-specific issues early.
- Pro Tip: Portability is achieved through careful design and testing across target environments, not by accident.
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.
- yesterday First seen · 682 lines · 7,553 tokens per session scan D c87ea6f774e8
github-copilot-instructions containerization-docker-best-practices.instructions.md is an instructions file published in the GitHub repository antiotaku/github-copilot-instructions (1 stars, last pushed 10mo ago), licensed MIT. It adds 7,553 tokens to every session, about $0.0378 per session on Opus 5. A static security scan graded it D with 3 findings (hidden instructions, recursive force delete, makes network calls). It is 97% identical to custom_github_copilot_agent_builder containerization-docker-best-practices.instructions.md, differing in 2 lines, and is treated as a copy.
Other instructions, from other repositories
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.