my-awesome-copilot: Instructions file for GitHub Copilot

.github/instructions/containerization-docker-best-practices.instructions.md

my-awesome-copilot containerization-docker-best-practices.instructions.md is an instructions file for GitHub Copilot from rockexe0000/my-awesome-copilot. It costs 7,553 tokens per session, scanned D, a copy of custom_github_copilot_agent_builder containerization-docker-best-practices.instructions.md, MIT.

Instructions for building and running Docker containers, which package an application with the files it needs to run consistently. They cover image size, build reproducibility, security scanning, and runtime practices.

In plain words
What is it for?
Writing and reviewing Dockerfiles, using multi-stage builds, reducing image layers, pinning dependencies, scanning images, and operating containers safely.
Why use it?
They help avoid oversized, insecure, inconsistent, or difficult-to-update container images.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is rockexe0000/my-awesome-copilot's own configuration. It tells GitHub Copilot how to work on my-awesome-copilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything my-awesome-copilot configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is COPY src/ ./src/.

Reuse

Borrowing it

Nothing to install: this file belongs to rockexe0000/my-awesome-copilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rockexe0000/my-awesome-copilot/main/.github/instructions/containerization-docker-best-practices.instructions.md
Clone the repo
git clone --depth 1 https://github.com/rockexe0000/my-awesome-copilot

Made for: GitHub Copilot.

Wrote 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.

agentmods badge for my-awesome-copilot containerization-docker-best-practices.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rockexe0000/my-awesome-copilot/containerization-docker-best-practices/github.svg)](https://agentmods.dev/instructions/rockexe0000/my-awesome-copilot/containerization-docker-best-practices)
Your own site
<a href="https://agentmods.dev/instructions/rockexe0000/my-awesome-copilot/containerization-docker-best-practices"><img src="https://agentmods.dev/badge/instructions/rockexe0000/my-awesome-copilot/containerization-docker-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for my-awesome-copilot containerization-docker-best-practices.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/rockexe0000/my-awesome-copilot/containerization-docker-best-practices"><img src="https://agentmods.dev/badge/instructions/rockexe0000/my-awesome-copilot/containerization-docker-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,553 This file is loaded in full into every session.
When invoked 7,553 The same file — it is already loaded in full.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.07553 $0.07553
Opus 5.5 $0.03021 $0.03021
Sonnet 5.5 $0.01511 $0.01511
Haiku 4.5 $0.00755 $0.00755

Measured 3mo ago against content hash 7ad5c3eaac93, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

my-awesome-copilot 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 3mo 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.

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
Origin

This is a copy

97% identical to custom_github_copilot_agent_builder containerization-docker-best-practices.instructions.md — 3 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.

.github/instructions/containerization-docker-best-practices.instructions.md · 681 lines

How it starts

The opening of the file, as written. The whole thing — 681 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, latest for 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.

Read the full file on GitHub · 681 lines

Changes

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.

  1. 3mo ago First seen · 681 lines · 7,553 tokens per session scan D 7ad5c3eaac93

Subscribe to this mod's changes

my-awesome-copilot containerization-docker-best-practices.instructions.md is an instructions file published in the GitHub repository rockexe0000/my-awesome-copilot (1 stars, last pushed 11mo ago), licensed MIT. It adds 7,553 tokens to every session, about $0.0302 per session on Opus 5.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 3 lines, and is treated as a copy.

Related

my-awesome-copilot containerization-docker-best-practices.instructions.md compared with instructions from other repositories

my-awesome-copilot containerization-docker-best-practices.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
my-awesome-copilot containerization-docker-best-practices.instructions.mdrockexe0000/my-awesome-copilotInstructions file111mo agoMITD7,553GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,951Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file291kyesterdayMITA4,396Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,303GitHub Copilot