Dockerfile standards

Coding rules for Dockerfiles, which describe how to build and run applications inside isolated containers.

In plain words
What is it for?
Use it when creating or reviewing Dockerfiles, especially their build stages, base images, user permissions, working directory, and startup command.
Why use it?
It reduces image size, limits security risks, and makes the container's startup behavior explicit.

Instructions file for GitHub Copilot

Install

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.

agentmods
npx agentmods add instructions/bitia-srl/bitia-vs-code-copilot-examples/docker
Clone the repo
git clone --depth 1 https://github.com/bitia-srl/bitia-vs-code-copilot-examples

Made for: GitHub Copilot.

Per session 83 This file is loaded in full into every session.
When invoked 83 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found 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 $0.00083 $0.00083
Opus 5 $0.00042 $0.00042
Sonnet 5 $0.00017 $0.00017
Haiku 4.5 $0.00008 $0.00008

Measured 2d ago against content hash d3a25489be84, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Dockerfile standards scanned grade A with 1 finding 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 2d 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Do not run as root in the final image.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

exercises/01-custom-instructions/.github/instructions/docker.instructions.md · 15 lines

What it actually says

Docker instructions

For Dockerfiles in this repository:

  • Prefer multi-stage builds.
  • Use small base images where practical.
  • Do not run as root in the final image.
  • Set explicit working directory and entrypoint.
  • Keep layer count low by combining compatible commands.
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. 2d ago First seen · 15 lines · 83 tokens per session scan A d3a25489be84

Subscribe to this mod's changes

Dockerfile standards is an instructions file published in the GitHub repository bitia-srl/bitia-vs-code-copilot-examples (2 stars, last pushed 6mo ago), licensed MIT. It adds 83 tokens to every session, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.