
Container Images Demo
A collection of containerized services running as Vercel Functions, each built from its own Dockerfile and routed through a single vercel.json. It showcases the Vercel Dockerfile runtime alongside the native Next.js runtime — nine independent services sharing one domain.
Demo
https://container-images-demo.labs.vercel.dev
Services
| Service | Route | Stack | Description |
|---|---|---|---|
| web | / | Next.js 16, React 19, Tailwind v4 | Landing page linking to every service (native nextjs framework, no Dockerfile). |
| rust | /rust | Rust, axum, tokio | Dynamic HTTP server. |
| go | /go | Go stdlib net/http | Lightweight server on a distroless image. |
| wasm | /wasm | Rust → WebAssembly, nginx | Static site running a Rust-compiled WASM module in the browser. |
| browser | /browser | Go, chromedp, headless Chromium | Streams live page-load status over WebSocket and returns a screenshot. |
| ffmpeg | /ffmpeg | Go, ffmpeg | Transforms media (gif, thumbnail, mp4, mp3, waveform) with live progress over WebSocket. |
| doom | /doom | Go, Xvfb, chocolate-doom, ffmpeg | Playable Doom streamed as MJPEG over WebSocket with keyboard/mouse input. |
| qr | /qr | Go, go-qrcode | Stateless QR code generator with an optional centered logo. |
| php | /php | Laravel 12, dompdf | Stateless PDF invoice generator. |
How It Works
Each service is self-contained — it serves its own UI and its own API/WebSocket endpoints under its path prefix. There is no API gateway: vercel.json declares each service and uses rewrites to route requests by path. The web service is a static directory page; a final catch-all rewrite sends all other traffic to it.
{"services": {"rust": { "root": "apps/rust", "entrypoint": "Dockerfile" },// ...other Dockerfile services"web": { "root": "apps/web", "framework": "nextjs" }},"rewrites": [{ "source": "/rust/(.*)", "destination": { "service": "rust" } },{ "source": "/rust", "destination": { "service": "rust" } },// ...other service routes{ "source": "/(.*)", "destination": { "service": "web" } }]}
How to Use
You can choose from one of the following two methods to use this repository:
One-Click Deploy
Deploy the example using Vercel:
Clone and Deploy
git clone https://github.com/vercel/examples/tree/main/container-images/demo
Install the Vercel CLI:
npm i -g vercel
Then run the app at the root of the repository:
vercel dev
