dockerize-app
Skill4 starsChanged 27 days agoMITView on GitHub
Use when asked to dockerize or containerize an app, write or fix a Dockerfile or docker-compose.yml, shrink a large Docker image, speed up slow Docker builds, or run an app with its database locally in containers — Node, Python, Java, Go and others.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- pensarai/skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- pensarai/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- accessibility-auditSkill
- api-design-reviewSkill
- api-test-writerSkill
- architecture-diagramSkill
- bug-debuggerSkill
- bug-report-writerSkill
- changelog-writerSkill
- codebase-onboardingSkill
- code-reviewSkill
- database-schema-designSkill
- dependency-upgradeSkill
- design-handoff-specSkill
- design-reviewSkill
- figma-design-compareSkill
- flaky-test-fixerSkill
- git-commit-writerSkill
- github-actions-ciSkill
- playwright-e2e-testsSkill
- prd-writerSkill
- proof-of-done-liteSkill
- readme-writerSkill
- refactor-plannerSkill
- security-auditSkill
- seo-auditSkill
- test-case-generatorSkill
- test-plan-writerSkill
- test-writerSkill
- ux-research-synthesisSkill
- ux-writingSkill
- web-performance-auditSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Write
.dockerignore: before the first build. - Very specific: line 18
Write
docker-compose.yml: if the app needs services, with health checks and named volumes. - Distinctive: line 45
If Docker is not available to run, say the files are unverified.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dockerize App
Overview
Produce a small, secure, fast-building image that runs the app exactly as it runs today. Read how the project builds and starts before writing a line, and prove the result by building and running it.
Method
- Discover: runtime and version (
.nvmrc,engines,python_requires,pom.xml,go.mod), package manager and lockfile, build command, start command, port, required environment variables (.env.example), and services it needs (database, cache). Secrets check: if a.envor similar file in the project holds real-looking credentials (passwords, production hosts, API keys), tell the user in your reply: it must stay out of the image and out of git, and any secret that was ever committed should be rotated. Never use that file in exampledocker run --env-filecommands; use.env.exampleas the template. - Write the Dockerfile with the rules below. Templates per stack are in templates.md.
- Write
.dockerignorebefore the first build. - Write
docker-compose.ymlif the app needs services, with health checks and named volumes. - Build and run to verify:
docker build -t app .,docker run --rm -p <port>:<port> --env-file .env app, then hit the health or home route. Report image size (docker images app).
Rules
| Rule | Why |
| Multi-stage build: build stage with dev tools, slim runtime stage | Smaller, fewer vulnerabilities |
Pin base image versions (node:22-alpine, not node:latest) | Reproducible builds |
| Copy lockfile and install dependencies before copying source | Dependency layer stays cached |
Use the lockfile install command (npm ci, pip install -r, mvn -B package) | Exact versions |
| Run as a non-root user | Container escape is less damaging |
| No secrets in the image or build args; pass them at runtime | Images get shared and pushed |
One process per container; CMD in exec form (["node", "server.js"]) | Correct signal handling and shutdown |
HEALTHCHECK or a compose healthcheck | Orchestrators know when it is ready |
.dockerignore excludes node_modules, .git, .env, build output, tests | Faster context, no leaked files |
Output
The Dockerfile, .dockerignore, optional docker-compose.yml, then:
Build: docker build -t <name> .
Run: docker run --rm -p 3000:3000 --env-file .env <name>
Image size: <size> Verified: <route> returned <status>If Docker is not available to run, say the files are unverified.
Common mistakes
COPY . .before installing dependencies, so every code change reinstalls everything.- Copying
.envinto the image. - Using a full OS image (
node:22) for runtime when-slimor-alpineworks. - App listening on
localhostinside the container; it must bind to0.0.0.0. - Compose
depends_onwithout a healthcheck, so the app starts before the database is ready.
Made by Wageesha Tripathi · LinkedIn · Email · More skills
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

