Skip to content

urunc Examples🔗

This section provides complete, reproducible examples of popular applications built as Unikernels and packaged for urunc.

All examples primarily use Unikraft as the underlying unikernel framework, as it provides a consistent, robust building experience across different applications.

You can find the source code, Dockerfiles, and specific documentation for each example in the examples/ directory of the repository.

Available Examples🔗

Application Description Link
Nginx A high-performance web server built as a Unikraft unikernel. examples/nginx/
Redis An in-memory data structure store, used as a database and cache. examples/redis/
Httpreply A minimal, fast HTTP server commonly used for benchmarking and testing. examples/httpreply/

Building the Examples🔗

Each example directory contains a multi-stage Dockerfile. These files: 1. Use Unikraft's build tools (like kraftkit) to compile the application from source specifically for the qemu and x86_64 targets. 2. Package the resulting unikernel binary (and any necessary files like configuration files or rootfs) into a lightweight OCI image using the bunny packaging format.

You can build any example directly using a container builder like nerdctl or docker:

cd examples/nginx
docker build -t urunc-nginx-example .

And then run it over urunc:

docker run -d --runtime io.containerd.urunc.v2 urunc-nginx-example

Note: For specific build options, initialization commands, and verification steps, refer to the README.md inside each respective example's directory.

Optional workaround note for Redis: The Unikraft stable branch occasionally experiences upstream bugs (such as a recent missing <uk/assert.h> header in libukpod). To ensure a seamless experience, the examples/redis/Dockerfile implements a smart conditional build: if the standard compilation fails due to this known issue, it automatically injects the missing header and resumes the build. Once Unikraft patches the stable channel, the fallback will simply be ignored.