Skip to content

Firecracker Node Web

Fastify-ready Node rootfs used by the staff-side Firecracker deployment (firecracker-ctl-net). Built as a multi-stage Docker image whose final layer (alpine 3.21 + /rootfs.ext4) ships a cp entrypoint so the in-cluster stage Job can run the image directly and copy /rootfs.ext4 onto the firecracker rootfs PVC.

This is the long-lived deploy rootfs for Node endpoints submitted through the dashboard IDE — week-to-month TTL VMs where paying a build-time npm install is the right tradeoff for instant boot. Quick one-shot Node VMs keep the smaller alpine-node rootfs plus the shared npm-cache.ext4 drive.

  • Alpine 3.21 + Node.js 22 LTS + npm
  • fastify, @fastify/cors, @fastify/helmet, @fastify/static, undici, zod, pino, pino-pretty, dotenv, nanoid, date-fns, commander, chalk resolved into /usr/lib/node_modules
  • ca-certificates-bundle, ca-certificates, iproute2
  • /etc/resolv.conf with 1.1.1.1 and 8.8.8.8
  • /init mounts /proc, /sys, /dev, brings up lo + eth0, exports NODE_PATH=/usr/lib/node_modules, then exec /entrypoint
ImageRuntimeDeploymentNetworkServer lib baked
alpine-pythonPythonfirecracker-ctl (public quick)noneno
alpine-nodeNodefirecracker-ctl (public quick)noneno
firecracker-python-netPythonfirecracker-ctl-net (staff, short-lived)TAP via Gluetun/WireGuardrequests/httpx
firecracker-python-webPythonfirecracker-ctl-net (staff, long-lived)TAP via Gluetun/WireGuardFastAPI
firecracker-node-web (this)Nodefirecracker-ctl-net (staff, long-lived)TAP via Gluetun/WireGuardFastify
Terminal window
npx nx run firecracker-node-web:container
npx nx run firecracker-node-web:extract

Output: packages/docker/firecracker/node/web/dist/node-web.ext4.

Terminal window
npx nx run firecracker-node-web:container:production

Pushes ghcr.io/kbve/firecracker-node-web:latest and :<version>.