// Note: the TypeScript builder does not expose fromBunImage yet.client.templates.builder().fromUbuntuImage("22.04");client.templates.builder().fromDebianImage();client.templates.builder().fromPythonImage("3.12");client.templates.builder().fromNodeImage("20");
# Predefined helpers resolve to a base_image OCI ref server-side. Builds stream# over SSE — see the API reference for the full request schema.curl -N -X POST "${NULLSPACE_API_URL}/v1/templates/build" \ -H "Authorization: Bearer ${NULLSPACE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"name": "demo", "base_image": "python:3.12"}'
from_bun_image() requires an explicit Bun version and maps to
oven/bun:<version>.
# Custom and base images both populate base_image. Builds stream over SSE —# see the API reference for the full request schema.curl -N -X POST "${NULLSPACE_API_URL}/v1/templates/build" \ -H "Authorization: Bearer ${NULLSPACE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"name": "demo", "base_image": "registry.example.com/team/app:1.0"}'
# The HTTP API takes inline Dockerfile content via the "dockerfile" field# (the SDK/CLI read the file for you). Builds stream over SSE — see the# API reference for the full request schema.curl -N -X POST "${NULLSPACE_API_URL}/v1/templates/build" \ -H "Authorization: Bearer ${NULLSPACE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"name": "demo-from-dockerfile", "dockerfile": "FROM ubuntu:22.04\nRUN apt-get update && apt-get install -y jq"}'
The TypeScript SDK builds Dockerfiles from inline content with
fromDockerfileContent(...); it does not read a Dockerfile path for you.
# Inline Dockerfile content goes in the "dockerfile" field. Builds stream over# SSE — see the API reference for the full request schema.curl -N -X POST "${NULLSPACE_API_URL}/v1/templates/build" \ -H "Authorization: Bearer ${NULLSPACE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"name": "demo", "dockerfile": "FROM ubuntu:22.04\nRUN apt-get update && apt-get install -y jq"}'
Dockerfile builds use BuildKit. BuildKit-backed builds evaluate the Dockerfile,
then import the resulting OCI image into a Nullspace rootfs and snapshot.
build_backend="native" remains valid for non-Dockerfile declarative/OCI
requests and historical build filters, but Dockerfile input with the native
backend is rejected.
When a custom image or external Dockerfile FROM imports an OCI image,
Nullspace imports these runtime defaults:
OCI data
Import behavior
Env
KEY=VALUE entries become runtime env defaults; malformed entries are skipped.
User
Trimmed non-empty values become the default user. Supported Linux forms include names, numeric ids, and user/group combinations.
WorkingDir
Trimmed non-empty values become the default workdir.
Entrypoint and Cmd
Arrays are concatenated and shell-escaped into one start command.
Labels
Retained as template/build OCI metadata.
Exposed ports
Retained as metadata and hints; they do not publish traffic by themselves.
Volumes
Retained as metadata only; no persistent Nullspace volume is created automatically.
Healthcheck
Retained as metadata and mapped to command readiness when semantics are safe.
Layers
Raw tar, gzip, Docker tar/gzip, nondistributable variants, and zstd OCI layers are supported.
Filesystem entries
Regular files, directories, symlinks, hard links, and OCI whiteouts are applied when paths stay inside the rootfs. Mode bits and uid/gid ownership are preserved in the generated ext4 rootfs.
Platform
Linux manifests are selected for the machine host architecture. Manifests with os.version or os.features are rejected.
Nullspace does not import stop signal, shell metadata, or arbitrary annotations
into runtime config today. Special files such as sockets, FIFOs, block devices,
character devices, sparse tar entries, and unknown tar entries are rejected.