dockerize-app
Installation
SKILL.md
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).