Home / Companies / Aspect Build / Blog / Post Details
Content Deep Dive

Dagger and Bazel

Blog post from Aspect Build

Post Details
Company
Date Published
Author
Chris Chinchilla
Word Count
1,441
Language
English
Hacker News Points
-
Summary

Dagger is a relatively new tool and platform created by Solomon Hyke, the founder of Docker, designed for ephemerally building and testing multi-language projects using containers. Unlike the dependency injection framework of the same name, this Dagger allows developers to define infrastructure and pipeline tasks through programming languages like Python, Go, or TypeScript, which makes it simpler to start but requires some rethinking if coming from traditional tools. It uses Dagger Functions to execute tasks, and can be extended with Daggerverse modules for varied use cases, but is mainly driven by a single company's efforts. Dagger's portability contrasts with Bazel's use of native environments, which are more performant but less consistent across platforms. Bazel, older and with a larger community, offers reproducibility and extensive language support through "rules" but requires understanding of its configuration language, Starlark. While Dagger is open-source and has a growing contributor base, its reliance on containers can be limiting for some tasks, and it may not fit all projects, especially if current monolithic toolchains like Bazel, Gradle, or Nix are serving well. The decision to adopt Dagger or similar "code as infrastructure" tools should consider whether the benefits outweigh the investment in learning and transitioning from existing, reliable tools.