create-dockerfile

A tool for creating or improving a Dockerfile, the recipe Docker uses to package an application and its dependencies into a container.

In plain words
What is it for?
Use it to create Dockerfiles for web servers, workers, or command-line applications and prepare them for environments such as Kubernetes, ECS, or Docker.
Why use it?
It helps turn application requirements into a Docker setup while accounting for runtime, startup commands, ports, and external services.

Skill for Claude CodeCodex

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 skills/abdullahkhawer/devops-skills/create-dockerfile
Any agent
npx skills add abdullahkhawer/devops-skills --skill create-dockerfile
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00022 $0.00640
Opus 5 $0.00011 $0.00320
Sonnet 5 $0.00004 $0.00128
Haiku 4.5 $0.00002 $0.00064

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

Security

Grade A, and why

create-dockerfile scanned grade A with 0 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/create-dockerfile/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create Dockerfile Skill

Run this skill when asked to create or improve a Dockerfile for an application.

Step 1 — Gather requirements

Ask the user for all details about their Docker/container requirements. Cover at minimum:

  • Application language and runtime (e.g. Node.js 20, Python 3.12, Java 21)
  • Application type (web server, worker, CLI tool, etc.)
  • Entry point / startup command
  • Exposed ports (if any)
  • Environment variables needed
  • External dependencies or services
  • Target deployment environment (Kubernetes, ECS, bare Docker, etc.)
  • Any specific base image preferences or restrictions
  • Whether multi-stage builds are acceptable

Also scan the current working directory for existing dependency files to infer requirements automatically:

ls

Read any relevant files found (e.g. package.json, requirements.txt, pom.xml, go.mod, Gemfile, Cargo.toml) before composing the Dockerfile.


Step 2 — Create the Dockerfile

Write the Dockerfile to the working directory following these mandatory practices:

Build & layer optimization

  • Order layers from least to most frequently changing (copy dependency files before source code).
  • Use multi-stage builds to separate build-time dependencies from the final runtime image.
  • Clean up package manager caches in the same RUN layer they are created.

Base image

  • Use official, minimal base images (e.g. alpine, slim, distroless) unless the user specifies otherwise.
  • Pin base image versions — never use latest.

Security

  • Run the application as a non-root user; create a dedicated user if needed.
  • Do not copy credentials, .env files, or secrets into the image.
  • Add a .dockerignore note if one is missing — advise the user to create it.

Correctness

  • Use COPY instead of ADD unless extracting archives.
  • Set WORKDIR explicitly.
  • Use CMD in exec form (["executable", "arg"]), not shell form, for proper signal handling.
  • Use EXPOSE to document the port (informational only).

Read the full file on GitHub · 78 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. 3d ago First seen · 78 lines · 22 tokens per session scan A 6a2c6f128b74

Subscribe to this mod's changes

create-dockerfile is a skill published in the GitHub repository abdullahkhawer/devops-skills (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 22 tokens to every session and 640 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

docker-build-deploy

Use when containerizing a Node.js app and setting up GitHub Actions CI/CD to build, push to GHCR, and deploy via SSH. Multi-stage build, non-root user, caching.

wu529778790/shenzjd-skills · 44 tokens

development-environment

IDE setup, dev containers, and local development tools.

miles990/claude-software-skills · 14 tokens

dokploy-deploy

This skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".

fcakyon/claude-codex-settings · 63 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

start-temps-cluster

Start (or restart) a local multi-node Temps cluster using Docker-in-Docker — one control plane + 3 worker nodes, each a privileged DinD container running its own dockerd + temps agent, wired with the real multi-host overlay (VXLAN, computecidr allocation) via tools/dev-cluster/ in whichever checkout/worktree you run…

gotempsh/temps · 204 tokens

docker-local-build

Build and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.

kurtosis-tech/kurtosis · 56 tokens