Stacker: Reproducible, Unprivileged OCI Image Builds

Shriira Press

Preface

Build standard OCI images reproducibly from a declarative YAML file — no daemon, no root, no Dockerfile.

Welcome to Stacker: Reproducible, Unprivileged OCI Image Builds.

Stacker is a CNCF Sandbox project that builds Open Container Initiative images the way many people wish container builds had worked from the start: from a declarative stacker.yaml file, without a background daemon, and without requiring root. It runs as a single binary that uses Linux user namespaces and unprivileged overlay mounts to assemble images inside a hermetically sealed environment, caches every input so that only what changed gets rebuilt, and writes its results directly as a standard OCI image layout that any compliant registry or runtime can consume. This book begins with the problem Stacker exists to solve — the privilege, reproducibility, and supply-chain gaps in traditional image building — and then works through the anatomy of a stacker file, the rootless build engine and its overlay-and-cache machinery, the OCI layout it produces, the command-line workflow from build to publish, and its place in a security-conscious supply chain alongside zot, cosign, and SBOMs. It closes with a practical chapter on adopting Stacker in real pipelines. By the end you will understand not just how to write a stacker file, but why building images this way matters.

This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.

A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.

We hope it serves you well.

— Shriira Press

Contents

  1. Chapter 1 — Why Build Images Differently
  2. Chapter 2 — The Stacker File
  3. Chapter 3 — Inside the Build Engine
  4. Chapter 4 — Layers, Imports, and the Cache
  5. Chapter 5 — The OCI Image Layout
  6. Chapter 6 — The Command-Line Workflow
  7. Chapter 7 — Stacker in Practice
0%
1/1