Skip to content
docker · firecracker · node · fastify · base-image

Fastify-ready Node rootfs forFirecracker

A Fastify-ready Alpine 3.24 + Node.js 24 Firecracker rootfs for long-lived dashboard-IDE endpoints — baking fastify, undici, zod, and pino-pretty so staff VMs boot with the server libraries already on disk.

Baked for instant boot

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.

  • Runtime — Alpine 3.24 + Node.js 24 + npm.
  • Deployment — staff-side networked firecracker-ctl.
firecracker-node-webImage
Node.js 24Runtime
FastifyServer lib
TAPNetwork

What it gives you

Features

Fastify stack baked

fastify, @fastify/cors, helmet, static, undici, zod, pino-pretty, dotenv, nanoid and more resolved into /usr/lib/node_modules.

Network-ready

ca-certificates, iproute2, and /etc/resolv.conf pointing at 1.1.1.1 and 8.8.8.8 for per-VM TAP networking.

cp-entrypoint stage image

Multi-stage Docker build whose final layer ships a cp entrypoint so an in-cluster stage Job copies /rootfs.ext4 onto the rootfs PVC.

Boot init

/init mounts /proc /sys /dev /tmp, brings up lo + eth0, exports NODE_PATH, then runs the fc_entrypoint from the kernel command line.

Rootfs & ecosystem

Overview

Overview

Fastify-ready Node rootfs used by the staff-side networked Firecracker deployments (firecracker-ctl-direct, and firecracker-ctl-net while it is parked). Built as a multi-stage Docker image whose final layer (busybox + a 224 MB /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.

What’s baked in

  • Alpine 3.24 + Node.js 24 (pinned nodejs and brotli-libs) + npm
  • fastify, @fastify/cors, @fastify/helmet, @fastify/static, undici, zod, 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 and a tmpfs /tmp, brings up lo + eth0, exports NODE_PATH=/usr/lib/node_modules, copies in extra packages when a packages drive is attached (/dev/vdc + /dev/vdd), then runs the code on /dev/vdb with the fc_entrypoint= from the kernel command line

Ecosystem

ImageRuntimeDeploymentNetworkServer lib baked
alpine-pythonPythonfirecracker-ctl (public quick)noneno
alpine-nodeNodefirecracker-ctl (public quick)noneno
firecracker-python-netPythonfirecracker-ctl-net (staff, short-lived)TAPrequests/httpx
firecracker-python-webPythonfirecracker-ctl-net (staff, long-lived)TAPFastAPI
firecracker-node-web (this)Nodefirecracker-ctl-net (staff, long-lived)TAPFastify

Build & publish

Build & publish

Build

Terminal window
docker build -t firecracker-node-web services/firecracker/rootfs/node-web
docker run --rm -v "$PWD:/out" firecracker-node-web /rootfs.ext4 /out/node-web.ext4

The image’s entrypoint is cp, the same call the stage Job makes.

Publish

Terminal window
sh tools/version-sync/sync.sh bump firecracker-node-web <version>

CI builds registry.gitlab.com/kbve/workspace/firecracker-node-web:<version> from the bump, then opens the merge request that repoints the stage Job.

Questions

Frequently asked

What is the Firecracker Node Web rootfs?

It is a Fastify-ready Alpine 3.24 + Node.js 24 rootfs used by the staff-side, networked Firecracker deployments. It is built as a multi-stage Docker image whose final busybox layer ships a cp entrypoint so an in-cluster stage Job copies /rootfs.ext4 onto the firecracker rootfs PVC.

Why bake npm dependencies into the image?

This is the long-lived deploy rootfs for Node endpoints submitted through the dashboard IDE, running week-to-month TTL VMs. Paying a build-time npm install is the right tradeoff for instant boot, so fastify, undici, zod, pino-pretty, and the @fastify ecosystem ship already resolved into /usr/lib/node_modules.

When should I use alpine-node instead?

Quick one-shot Node VMs use the smaller alpine-node rootfs plus the shared npm-cache.ext4 drive. Use firecracker-node-web only for long-lived staff endpoints that benefit from pre-baked server libraries.

Discuss on the forum

Questions, fixes and notes on this page live in the KBVE forum.