— No reviews yet
0 installs
15 views
0.0% view→install
Install
$ agentstack add skill-pulkit0x-claude-armory-dockerfile-generator ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of Dockerfile? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
Dockerfile Generator
Analyze the current project and generate an optimized, production-ready, multi-stage Dockerfile.
Process
- Detect project stack by scanning for manifest files:
package.json/yarn.lock/pnpm-lock.yaml-> Node.jspom.xml/build.gradle-> Java (Maven/Gradle)requirements.txt/pyproject.toml/Pipfile-> Pythongo.mod-> GoCargo.toml-> RustGemfile-> Rubypubspec.yaml-> Dart/Flutter*.csproj/*.sln-> .NET
- Detect framework from dependencies:
- Express, Next.js, Nest.js, Fastify (Node)
- Spring Boot, Quarkus (Java)
- Django, Flask, FastAPI (Python)
- Gin, Echo, Fiber (Go)
- Read project config for:
- Entry point / main file
- Build commands
- Port numbers
- Environment variable requirements
- Generate Dockerfile following best practices.
- Generate .dockerignore if it doesn't exist.
Best Practices to Follow
Always
- Use multi-stage builds (builder + runtime)
- Use specific version tags for base images (not
latest) - Use slim/alpine base images for runtime
- Run as non-root user in production stage
- Set
WORKDIRexplicitly - Copy dependency files first, install, then copy source (layer caching)
- Use
COPYnotADD(unless extracting archives) - Set
ENV NODE_ENV=productionor equivalent - Include
HEALTHCHECKinstruction - Use
.dockerignoreto exclude unnecessary files
Never
- Install dev dependencies in the runtime image
- Leave package manager caches in the final image
- Use
rootuser in the final stage - Hardcode secrets or credentials
- Use
latesttag for base images
Templates by Stack
Node.js
FROM node:-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:-alpine
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY package*.json ./
USER appuser
EXPOSE
HEALTHCHECK CMD wget -q --spider http://localhost:/health || exit 1
CMD ["node", "dist/index.js"]
Java (Spring Boot)
FROM eclipse-temurin:-jdk-alpine AS builder
WORKDIR /app
COPY pom.xml mvnw ./
COPY .mvn .mvn
RUN ./mvnw dependency:resolve
COPY src ./src
RUN ./mvnw package -DskipTests
FROM eclipse-temurin:-jre-alpine
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
WORKDIR /app
COPY --from=builder /app/target/*.jar app.jar
USER appuser
EXPOSE
HEALTHCHECK CMD wget -q --spider http://localhost:/actuator/health || exit 1
ENTRYPOINT ["java", "-jar", "app.jar"]
Python
FROM python:-slim AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
FROM python:-slim
RUN useradd -m -r appuser
WORKDIR /app
COPY --from=builder /install /usr/local
COPY . .
USER appuser
EXPOSE
HEALTHCHECK CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:/health')" || exit 1
CMD ["python", "app.py"]
Go
FROM golang:-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o server .
FROM alpine:3.19
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
WORKDIR /app
COPY --from=builder /app/server .
USER appuser
EXPOSE
HEALTHCHECK CMD wget -q --spider http://localhost:/health || exit 1
CMD ["./server"]
Output
- Write the
Dockerfileto the project root. - Write
.dockerignoreif it doesn't exist. - Print a summary: detected stack, base image chosen, exposed port, and build/run commands:
`` docker build -t . docker run -p : ``
Notes
- If
$ARGUMENTScontains a framework hint (e.g., "nextjs", "spring"), use that to guide detection. - If multiple stacks detected (monorepo), ask the user which service to dockerize.
- Always read the existing Dockerfile first if one exists — offer to improve it rather than overwrite.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: pulkit0x
- Source: pulkit0x/claude-armory
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.