No, for most web apps. If your app runs on a framework, platforms with framework detection build and deploy it from source, no Dockerfile required. Vercel detects the framework and handles the build. A Dockerfile earns its place in specific cases: system libraries, undetected frameworks, or apps you deploy as-is.
This article covers when framework detection is enough, when a Dockerfile is the right call, and how to run both paths in one project.
Copy link to headingWhen can you skip Docker?
Most deployment tutorials open with a Dockerfile because a container is the common denominator: every platform can run one. But if your app is built on a framework, the Dockerfile is often a build artifact you don't need. Several platforms build from source without one.
Vercel has first-class support for a wide range of popular frameworks, often deployable without upfront configuration. The supported list includes Next.js, Nuxt, SvelteKit, Astro, Remix, Vite, Angular, and Vue on the frontend, and Express, Fastify, NestJS, Koa, Hono, H3, Nitro, FastAPI, Flask, Django, and Go on the server. You push your code, the platform detects the framework, and the build runs from source.
Skipping the Dockerfile doesn't mean skipping platform features. Framework deployments get preview URLs for each pull request through git integration, Vercel Functions that scale with traffic, middleware, incremental static regeneration (ISR), and multi-runtime support.
If your project uses no framework at all, there's still a source-based path: with the Build Output API, a project produces a .vercel/output directory and uses platform features without a framework.
Copy link to headingWhen is a Dockerfile the right call?
A container image is the documented path when framework detection doesn't apply. Four cases:
Backend services in any language or runtime, such as Go, Rust, Python, or Ruby
Apps that need system libraries, such as FFmpeg or Chromium
Frameworks outside auto-detection
Workloads that require identical behavior across environments
The pattern across those four: Docker is the fallback for what framework detection doesn't cover, not the default starting point. If you're rendering video with FFmpeg, running a headless browser, or shipping an app the platform can't detect, the Dockerfile is doing real work. 7 ways to use Docker containers on Vercel walks through what containers on Vercel are used for in practice.
And on Vercel, taking this path is a one-file addition rather than an infrastructure project. Add a Dockerfile.vercel (or Containerfile.vercel) at the project root; Vercel builds the image on each deploy, stores it in Vercel Container Registry, and serves it as a Vercel Function with Active CPU pricing. A "Container" preset sits alongside the framework presets for deploying any project as a container image built from a Dockerfile. The workflow doesn't change either: with or without Docker, deploys run through the same git push, with preview deployments per commit.
Copy link to headingCan you mix both in one project?
Yes, and this is where the either/or framing breaks down. Services in vercel.json let one project contain multiple services. Each service builds according to its detected framework and runtime, and a service that needs a container sets its runtime to container. Traffic routes between services through top-level rewrites, so a detected framework and a container can share one project.
Docker also keeps a role in zero-config setups: it helps pin dependencies for consistency, and the Next.js repository includes a Dockerfile example. For local work, vercel dev runs container images on your machine, which requires the docker CLI and daemon.
Copy link to headingWhat skipping Docker does not mean
It doesn't remove the need for statelessness. Framework or container, compute on Vercel scales to zero and keeps no local state. Sessions and files belong in backing services.
Framework detection has edges. An app outside the supported list, or one that needs system libraries, won't build from source. That boundary is exactly the Dockerfile case above.
A Dockerfile doesn't opt you out of the platform model. A container on Vercel serves HTTP on
PORT(default 80), stays stateless, and runs within standard function limits. In production it scales down after 5 idle minutes, with aSIGTERMand a 30-second grace period.This page gives no guidance for always-on workers, GPU workloads, or disk-backed apps. Those are workload questions, not Docker questions; see the platform-fit guide in the related resources.
Copy link to headingFrequently asked questions
Copy link to headingDo you need Docker to deploy a Next.js app?
No. Vercel detects Next.js and builds it from source, and deploys run through a git push with preview deployments per commit. The Next.js repository includes a Dockerfile example for teams that want one, but deploying Next.js to Vercel does not require Docker.
Copy link to headingWhen is a Dockerfile the right choice on Vercel?
Vercel documents four cases for a container image: backend services in any language or runtime (Go, Rust, Python, Ruby), apps that need system libraries such as FFmpeg or Chromium, frameworks outside auto-detection, and workloads that require identical behavior across environments. In those cases, add a Dockerfile.vercel at the project root and Vercel builds and serves the image as a Vercel Function.
Copy link to headingCan I mix framework detection and a Dockerfile in one project?
Yes. Services in vercel.json let one Vercel project contain multiple services, and each service builds according to its detected framework and runtime. A service that needs a container sets its runtime to container, and traffic routes between services through top-level rewrites.
Copy link to headingDoes skipping Docker mean losing dev/prod parity?
No. With or without Docker, deploys on Vercel run through the same git push workflow with preview deployments per commit. Docker still helps where you want pinned dependencies for consistency: a zero-config setup can keep a Dockerfile, and the Next.js repository includes an example. For local runs, vercel dev runs container images, which requires the docker CLI and daemon.
Copy link to headingRelated resources
Does Vercel support Docker deployments? in the Knowledge Base
Run any Dockerfile on Vercel on the Vercel blog
Supported frameworks on Vercel in the Vercel Docs
Migrate to Vercel from Fly.io, Railway, Render, or Google Cloud Run