Dalec: Declarative Packages and Containers with BuildKit cover

Technology · Ebook

Dalec: Declarative Packages and Containers with BuildKit

by Shriira Press

4.8(308)126 pagesPublished 2026

Dalec is a CNCF sandbox project from Microsoft that turns a single declarative YAML spec into native RPMs and DEBs, distroless container images, and Windows artifacts — all through ordinary docker build, because Dalec is a BuildKit frontend. This book starts with the packaging problem Dalec solves and how a frontend reshapes the build, then walks the anatomy of a spec: its sources and declarative patching, the dependency and build-step model with offline caches for Go, Rust, Python, and Node, the artifacts and image configuration that yield real packages and slim containers, and the built-in tests, signing, SBOMs, and provenance that make the output trustworthy. A closing chapter covers CI adoption, multi-distribution strategy, and where Dalec fits. Every example is a real, buildable spec.

Contents

  1. 1Preface
  2. 2Chapter 1 — The Packaging Problem and the Frontend Idea
  3. 3Chapter 2 — Anatomy of a Dalec Spec
  4. 4Chapter 3 — Sources and Patching
  5. 5Chapter 4 — Building: Dependencies, Steps, and Generators
  6. 6Chapter 5 — Artifacts and Container Images
  7. 7Chapter 6 — Testing, Signing, and Supply-Chain Security
  8. 8Chapter 7 — Dalec in Practice