Vercel — AI · · 1 min read

Bring your Dockerfile to Vercel Functions

Mirrored from Vercel — AI for archival readability. Support the source by reading on the original site.

Vercel Functions now support deploying HTTP servers from a Dockerfile or Containerfile, using Open Container Initiative (OCI) compatible images on Fluid compute.

This makes it easier to bring existing applications written in any language to Vercel while keeping the preview deployments, logs, routing, and autoscaling benefits of using Vercel Functions and Fluid compute.

To use container images with your functions, create a project with a Dockerfile.vercel (or Containerfile.vercel) file that starts an HTTP server listening on $PORT:

Dockerfile.vercel
FROM golang:1.24-alpine AS build
WORKDIR /src
COPY . .
RUN go build -o /server main.go
FROM alpine:3.20
COPY --from=build /server /server
CMD ["/server"]

Build a container image on Vercel

This image will be built, pushed, and deployed on every commit to Vercel Container Registry.

Learn more about using container images in the docs.

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from Vercel — AI