Skip to content

Firecracker Python Web

FastAPI-ready Python 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 endpoints submitted through the dashboard IDE — week-to-month TTL VMs where paying a build-time pip install is the right tradeoff for instant boot. Quick one-shot VMs keep the smaller alpine-python rootfs plus the shared pip-cache.

  • Alpine 3.21 + Python 3.12
  • py3-pip, py3-requests, py3-httpx, py3-urllib3, py3-certifi (apk)
  • fastapi, uvicorn, starlette, python-multipart, email-validator, websockets, anyio, sniffio, h11, click (pip, musllinux wheels)
  • 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, then exec /entrypoint
ImageDeploymentNetworkDNSrequests bakedFastAPI baked
alpine-pythonfirecracker-ctl (public quick)nonenonono
firecracker-python-netfirecracker-ctl-net (staff, short-lived)TAP via Gluetun/WireGuardyesyesno
firecracker-python-web (this)firecracker-ctl-net (staff, long-lived)TAP via Gluetun/WireGuardyesyesyes
Terminal window
npx nx run firecracker-python-web:container
npx nx run firecracker-python-web:extract

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

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

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