Skip to content

datumctl build plugin: build unikernel OCI images and push to any registry #174

Description

@scotwells

Goal

Give users a familiar, container-style workflow for producing unikernel images: a new datumctl build plugin that builds a unikernel OCI image from an application's Dockerfile and pushes it to a registry of the user's choosing (Docker Hub, GHCR, a private registry, …), producing an image reference that deploys directly on Datum compute.

Why

Deploying on Datum compute today requires a unikernel image that was built off-platform with the Unikraft toolchain and pushed by hand. That means knowing tooling and packaging rules most users have never seen — plain docker build output does not boot on the runtime. Users coming from other providers expect build then push with their existing registry credentials to just work; the build plugin closes that gap without asking them to learn unikernel internals.

Requirements

  • Familiar experience. Dockerfile in, image reference out: --tag/--push semantics that mirror docker build/docker push, with registry auth taken from the standard Docker credential config. Requiring a local Docker/BuildKit daemon is acceptable — that matches the experience of the tools users already run.
  • Any registry. The user picks the push target; nothing assumes a Datum-operated registry. Private registries work end to end with the existing image pull credential flow at deploy time.
  • Bootable output. The plugin owns the unikernel packaging rules (target platform, OCI index layout, PIE and image-size constraints) so images it produces boot on Datum compute, and constraint violations fail at build time with actionable errors instead of surfacing as boot failures.
  • Standard plugin distribution. Ships through the datumctl plugin index (datumctl plugin install …) like the existing compute plugin.

Acceptance criteria

From the consumer's point of view:

  • I can install the plugin with datumctl plugin install and get going from --help alone — no separate setup guide needed for a first build.
  • Starting from my app and its Dockerfile, one command builds a unikernel image and pushes it to my registry — Docker Hub, GHCR, or my private registry — using the credentials from my existing docker login.
  • The command prints the pushed image reference (tag and digest) ready to use in a deploy.
  • Deploying a workload with that reference boots and serves traffic, with no manual packaging or fix-up steps between build and deploy.
  • If my app can't run as a unikernel (unsupported binary, image too large, …), the build fails with a message that tells me what's wrong and what to change — I never find out via a boot failure.
  • The same command works unattended in CI: non-interactive auth and exit codes that fail my pipeline when the build or push fails.
  • A one-page quickstart takes me from an empty directory to a deployed hello-world.

Per-language guides and CI-tested working examples are tracked separately in #175; the quickstart above is part of this plugin's definition of done.

References

Authoring the plugin (datumctl):

Unikraft image building:

User-facing build guides to model ours on:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions