VERCEL

Run any Dockerfile on Vercel

Bùi Đăng MinhThứ hai, 29/6/2026, 10:00 (GMT+7)4 min read
Run any Dockerfile on Vercel

You have a server in a container. Maybe it's a Go service, a Rails app, a Spring Boot API, or a web server behind nginx. It speaks HTTP. It listens on a port. It just needs somewhere to run.

Add a Dockerfile.vercel file to your project, and Vercel builds, stores, deploys, and autoscales the image on Fluid compute, so you pay only for the CPU your code uses. No daemon to run locally, registry to set up, or cluster to babysit.

Here is a small HTTP server in Go, listening on $PORT:

A minimal HTTP server that reads its port from $PORT and answers every request.

Add a Dockerfile.vercel file that builds it into a small image and runs it:

A two-stage build that compiles the binary, then copies it into a minimal Alpine image that runs on boot.

One command builds the image, stores it, and ships it to Fluid compute, then prints the production URL.

That is it. Two files, and you are live. Every git push rebuilds the image and hands you a fresh preview URL. Or run vercel to deploy without committing.

Nguồn / Original source: Vercel (@vercel & @addyosmani)