Skip to content
benchline
ToolsMCPAbout
benchline

82 tools for people who ship the web. 70 run entirely in your browser. No account, no upload.

All tools operational

Tools

All toolsllms.txt generatorAI SEO checkerOG image generatorJWT decoder

Categories

All categoriesDeveloperData & FormatsSEO & AI SearchImage & MediaPDF & Documents

For agents

MCP setupAI accessllms.txtllms-full.txtOpenAPI

Benchline

AboutFounderPrivacyGitHubSitemap

benchline

© 2026 Benchline. Built by Waseem Anjum. MIT licensed.Built for the browser, callable over MCP.
  1. Tools
  2. Developer
  3. Next.js
  4. Next.js Dockerfile generator

Next.js Dockerfile generator

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

Runs in your browser
Use via MCP

MCP

Use this tool from your agent

Add the server once, then ask for the job in plain words. No key.

Setup guideAll MCP tools

Tool name

build_nextjs_dockerfile

Endpoint

https://benchline.fabwaseem.com/mcp
Auth
None
Rate
60 / min
  1. 1Add the server config for your client.
  2. 2Ask your agent to run build_nextjs_dockerfile, or describe the job.
  3. 3Or send the tools/call request yourself.
~/.cursor/mcp.jsonjson
1{
2 "mcpServers": {
3 "benchline": {
4 "url": "https://benchline.fabwaseem.com/mcp"
5 }
6 }
7}
tools/call requestjson
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}

Next

Related tools

  • Cron expression builderBuild or paste a cron schedule, read it in plain English, and see the next run times.CronMCPNew
  • OG image generatorPick a template, watch the card update, then download the PNG or copy the Next.js file.Social previewsMCP
  • JSON-LD schema generatorFill a form, get valid schema.org JSON-LD for Article, FAQ, Product, Organization, and more.SEOMCPNew
  • JWT decoderPaste a JSON Web Token, read the claims, and verify the signature in the browser.Auth debuggingMCP

Guide

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. 1Pick a package manager and Node versionChoose npm, pnpm, yarn, or bun, then Node 20, 22, or 24 on Alpine or Debian slim.
  2. 2Toggle standalone, Prisma, and the healthcheckStandalone is on by default. Prisma adds prisma generate. The healthcheck calls a route with node fetch, so the image does not need curl.
  3. 3Copy the files and run docker buildDownload the Dockerfile, ignore file, and compose file, set output standalone in next.config, then build and run.

FAQ

Questions people ask

Dockerfile.dockerignorecomposenext.configcommandsMore

Options

Standalone output
Prisma
prisma migrate deploy
Healthcheck
Disable telemetry
BuildKit cache mounts
Monorepo note

Comma-separated. They become ARG lines. Server secrets stay runtime env.

Files

Dockerfiledockerfile
1FROM node:22-alpine AS deps
2WORKDIR /app
3RUN apk add --no-cache libc6-compat
4RUN corepack enable
5ENV NEXT_TELEMETRY_DISABLED=1
6COPY package.json pnpm-lock.yaml* package-lock.json* yarn.lock* bun.lock* ./
7RUN --mount=type=cache,target=/pnpm/store pnpm install --frozen-lockfile
8
9FROM node:22-alpine AS builder
10WORKDIR /app
11RUN corepack enable
12ENV NEXT_TELEMETRY_DISABLED=1
13COPY --from=deps /app/node_modules ./node_modules
14COPY . .
15
16RUN pnpm build
17
18FROM node:22-alpine AS runner
19WORKDIR /app
20ENV NODE_ENV=production
21ENV NEXT_TELEMETRY_DISABLED=1
22ENV PORT=3000
23ENV HOSTNAME=0.0.0.0
24RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
25COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
26COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
27COPY --from=builder --chown=nextjs:nodejs /app/public ./public
28HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
29 CMD node -e "fetch('http://127.0.0.1:3000/api/health').then((res) => process.exit(res.ok ? 0 : 1)).catch(() => process.exit(1))"
30USER nextjs
31EXPOSE 3000
32CMD ["node", "server.js"]
33

docker build -t app docker run --rm -p 3000:3000 app

pnpm · Node 22 · alpine · standalone · 3 stages · 5 filesNon-root userThe runner stage adds user nextjs.Standalone outputThe runtime copies .next/standalone.Healthchecknode fetch /api/healthTelemetryNEXT_TELEMETRY_DISABLED=1
about 150–200 MBEstimated image size

A static estimate, not a measurement.

⌘⇧C copy Dockerfile · ⌘↵ download zip