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:
FROM golang:1.24-alpine AS buildWORKDIR /srcCOPY . .RUN go build -o /server main.go
FROM alpine:3.20COPY --from=build /server /serverCMD ["/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.