Dockerfile generator for your stack
Pick a stack and a few options and get a Dockerfile and a matching .dockerignore, ready to copy or download. Nothing is read from an existing project: you describe the new one.
What you get
- Twelve stacks: Node.js (Express, Nest and others), React, Vue, Angular, FastAPI, Django, .NET, Java, Go, Rust, PHP (Laravel, Symfony, plain Composer) and Ruby (Rails, Rack).
- Multi-stage by default: a build stage with the tools and a small runtime stage that copies the result. Prefer one stage? Choose production only or build and production mixed.
- Alpine or slim (Debian-based) base image, runtime version, port, package manager or build tool.
- React, Vue and Angular are built with Node and served by nginx, with an nginx.conf included.
- Healthcheck path, OS packages (apk or apt), runtime environment variables and build arguments such as VITE_* and NEXT_PUBLIC_*.
- A .dockerignore that matches the stack, so the build context stays small.
Sample output
# syntax=docker/dockerfile:1
FROM node:24-alpine AS base
WORKDIR /app
FROM base AS deps
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev && mkdir -p node_modules
FROM base AS build
COPY package.json package-lock.json* ./
RUN npm ci
COPY . .
RUN npm run build
RUN rm -rf node_modules && mkdir -p .next/cache && mv .next /next
FROM base AS runtime
ENV NODE_ENV=production PORT=3000
# The code and its dependencies belong to root: the app can read them, not rewrite them.
COPY --from=build /app ./
COPY --from=deps /app/node_modules ./node_modules
# Next.js writes its cache under .next: the only folder of the app the node user can write (it is empty for other apps).
COPY --from=build --chown=1000:1000 /next ./.next
USER 1000:1000
EXPOSE 3000
CMD ["npm","start"]
How it works
- Pick a stack and the options you need.
- Preview every file, and edit or switch off any block.
- Copy the files or download them as a zip.
Questions
Is the generated Dockerfile multi-stage?
Yes by default. A build stage holds the compilers and dev dependencies and the runtime stage copies only what it needs. You can switch to a single stage, either production only or build and production mixed.
Does it read my project?
No. You choose the stack and the options and the files are generated from that. The notes next to the output say what your project must provide, for example a start script for Node.js.
Will the Dockerfile build without changes?
It is a very good first draft, not a guarantee. It is checked as text but never built here, so expect small edits such as ports, commands or package names.
Can I use it from the command line?
Yes. The same generator runs as a CLI and as this web page.