Dockerize service
Generate a production-ready Dockerfile (and optional docker-compose) for a service. Use when asked to containerize or dockerize a Java (Maven/Gradle) or Python service. Produces a small, multi-stage, non-root image.From its SKILL.md
npx -y skills add vaibhavsaxena022/skills --skill dockerize-serviceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.6 KB, 297 tokens by cl100k_base, as published. Nobody here has run it
Dockerize Service
Produce a lean, production-ready container setup for the service.
Steps
- Detect the stack — Maven/Gradle (Java) or pip/poetry (Python). Find the build output and entrypoint.
- Write a multi-stage Dockerfile:
- Build stage — compile / install deps with layer caching: copy the manifest (
pom.xml,build.gradle,pyproject.toml,requirements.txt) first, then the source. - Runtime stage — a slim base (
eclipse-temurin:<v>-jre,python:<v>-slim); copy only the built artifact. - Run as a non-root user; set a fixed
WORKDIR;EXPOSEthe port; use exec-formENTRYPOINT.
- Build stage — compile / install deps with layer caching: copy the manifest (
- Add a
.dockerignore(excludetarget/,.venv/,.git, tests, secrets, IDE files). - (Optional) a
docker-compose.ymlwiring the service + its datastore for local dev.
Rules
- Pin base image tags — never
latest. - No secrets baked into the image — pass them via env vars / build args at runtime.
- Keep the runtime image minimal: no compilers or build tools in the final stage.
- Add a
HEALTHCHECKif the service exposes a health endpoint.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.