Next.js Dockerfile generator

Generate a production multi-stage Dockerfile for Next.js, plus .dockerignore and compose.

Runs in browser

Use from your agent

Streamable HTTP at https://benchline.fabwaseem.com/mcp. No key. The tool name is build_nextjs_dockerfile.

mcp.jsonjson
1{
2 "mcpServers": {
3 "benchline": {
4 "url": "https://benchline.fabwaseem.com/mcp"
5 }
6 }
7}
tools/calljson
1{
2 "jsonrpc": "2.0",
3 "id": 1,
4 "method": "tools/call",
5 "params": {
6 "name": "build_nextjs_dockerfile",
7 "arguments": {
8 "packageManager": "pnpm",
9 "node": "22",
10 "base": "slim",
11 "standalone": true,
12 "prisma": false,
13 "migrate": false,
14 "healthcheck": true,
15 "healthPath": "/api/health",
16 "port": 3000,
17 "publicEnvs": [],
18 "telemetryDisabled": true,
19 "cacheMounts": true,
20 "turbo": false
21 }
22 }
23}

How it works

Free Next.js Dockerfile generator. Pick your package manager, Node version, standalone output, Prisma, and healthcheck, and get a small multi-stage Dockerfile with .dockerignore, docker-compose.yml, and next.config settings.

  1. 01

    Pick a package manager and Node version

    Choose npm, pnpm, yarn, or bun, then Node 20, 22, or 24 on Alpine or Debian slim.

  2. 02

    Toggle standalone, Prisma, and the healthcheck

    Standalone is on by default. Prisma adds prisma generate. The healthcheck calls a route with node fetch, so the image does not need curl.

  3. 03

    Copy the files and run docker build

    Download the Dockerfile, ignore file, and compose file, set output standalone in next.config, then build and run.

FAQ