Skip to main content

building

TunaOS images are built with podman and the just command runner using multi-stage Containerfiles.

Prerequisites​

ToolMinimum VersionPurpose
podman5.xContainer build engine (BuildKit)
just1.xCommand runner
yq4.xYAML query tool for build config
git2.xSource control + submodules

Optional for ISO builds:

ToolPurpose
tackleboxISO generation (auto-downloaded if missing)
limaVM-based image verification
qemu-imgQCOW2 conversion

Quick Start​

# Clone the repo
git clone https://github.com/tuna-os/tunaOS.git
cd tunaOS

# Build Yellowfin with GNOME desktop
just build yellowfin gnome

This produces a local image tagged localhost/yellowfin:gnome.

Build Variants and Flavors​

Syntax​

just build <variant> <flavor>

Variants​

VariantBase OSNotes
yellowfinAlmaLinux Kitten 10Closest to upstream CentOS Stream
albacoreAlmaLinux 10Stable, RHEL-compatible
skipjackCentOS Stream 10Upstream of RHEL
bonitoFedora 44Cutting-edge packages
redfinRHEL 10Subscription required, local-build only

Flavors​

FlavorDescription
baseNo desktop environment
gnomeGNOME desktop
gnome50GNOME 50 (latest)
kdeKDE Plasma
cosmicCOSMIC desktop
niriNiri tiling compositor
gnome-hweGNOME with HWE kernel
gnome-nvidiaGNOME with NVIDIA drivers
gnome-nvidia-hweGNOME with NVIDIA on HWE kernel

Any desktop flavor can be combined with -hwe, -nvidia, or -nvidia-hwe suffixes.

Platform Selection​

The build auto-detects your platform. Override with:

just build yellowfin gnome target_platform=linux/arm64
just build albacore kde target_platform=linux/amd64/v2

Build Pipeline​

Each build runs through these stages:

  1. Context assembly β€” system files, brew files, and build scripts copied into a scratch image
  2. Base stage (base-no-de) β€” copy files, install packages, configure services, cleanup
  3. Hardware variant stage (optional) β€” base-hwe or base-nvidia for chain builds
  4. DE stage β€” install desktop packages (gnome.sh, kde.sh, etc.), versionlock glib2, symlink /opt β†’ /var/opt
  5. Chunkah rechunking β€” reduces image layer count for distribution efficiency
  6. Final stage β€” apply labels and OCI annotations

Containerfile Selection​

The Justfile automatically selects the correct Containerfile:

Flavor suffixContainerfileDescription
(none)ContainerfileBase build with base-no-de
-hweContainerfile.hweHWE kernel layer
-nvidiaContainerfile.nvidiaNVIDIA driver layer
-nvidia-hweContainerfile.nvidianvidia on HWE parent

Building ISOs​

# Build ISO for Yellowfin GNOME
just iso yellowfin gnome

# Build from GHCR images (no local build needed)
just iso yellowfin gnome repo=ghcr

This uses scripts/build-iso-tacklebox.sh which automatically downloads tacklebox if not installed.

Building QCOW2 disk images​

# Build QCOW2 for Lima/QEMU
just qcow2 yellowfin gnome

Building for RHEL (Redfin)​

Redfin requires a Red Hat subscription. See Redfin Setup for prerequisites. Then:

just build redfin base
just build redfin gnome

RHSM credentials are passed via BuildKit secrets β€” never stored in image layers.

Using Build Cache​

Local builds use a shared .rpm-cache volume for DNF package caching. The cache is:

  • Automatic β€” enabled for local builds, disabled for CI
  • Shared β€” all variants reuse the same cache
  • Persistent β€” survives just clean (use just clean-cache to remove)
# Clean build artifacts, keep cache
just clean

# Remove cache too
just clean-cache

Switching an Existing System​

If you're running a bootc-based OS:

# Switch to TunaOS
sudo bootc switch ghcr.io/tuna-os/yellowfin:gnome

Verification​

Test boot a QCOW2 image​

# Build and boot in Lima VM with automated DM check
just test-vm yellowfin gnome

# Full demo: build QCOW2, start VM, open noVNC in browser
just demo albacore gnome

Test boot an ISO​

# Build and boot ISO in QEMU via web browser
just demo-iso skipjack gnome

Verify image signatures​

All published TunaOS images are signed with cosign using keyless signing (OIDC). Verify any image before use:

# Verify with OIDC identity
cosign verify \
--certificate-identity https://github.com/tuna-os/tunaOS/.github/workflows/reusable-build-image.yml@refs/heads/main \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
ghcr.io/tuna-os/yellowfin:gnome

# Verify with public key (from cosign.pub in the repo)
cosign verify --key cosign.pub ghcr.io/tuna-os/yellowfin:gnome

For local builds, images are not signed β€” verification applies only to published GHCR images.