Entwickler-Tools

Dockerfile Generator

Generate production-ready Dockerfiles for Node.js, Python, Go, Java, Rust, and more with multi-stage builds and best practices

Configuration

Dockerfile
# ─── Build stage ───────────────────────────────────────────
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

# ─── Production stage ───────────────────────────────────────
FROM node:20-alpine
WORKDIR /app
RUN addgroup -S app && adduser -S app -G app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package*.json ./
RUN npm ci --omit=dev && npm cache clean --force
ENV NODE_ENV=production
EXPOSE 3000
USER app
CMD ["node", "dist/index.js"]

Nicht das Richtige dabei?

Wir bauen kostenlose Tools nach Community-Feedback. Schlagen Sie heute noch ein Tool vor!