What Is Dagger? A New Take on CI/CD for Kubernetes‑Native DevOps

Written By:
Founder & CTO
June 16, 2025

Modern software development is rapidly evolving, and with it, the expectations for continuous integration and continuous delivery (CI/CD) have grown more complex. Teams are building, testing, and deploying faster than ever, often across multiple platforms and environments. As Kubernetes becomes the default deployment target, there's a growing need for CI/CD systems that not only integrate seamlessly into Kubernetes-native environments but also provide a developer-friendly, flexible, and portable experience.

Dagger, a new open-source CI/CD engine, has emerged to meet this demand. Created by Docker’s co-founder Solomon Hykes, Dagger is designed from the ground up to rethink how developers approach CI/CD pipelines, by letting them define and run pipelines in code, using containers as the foundational execution model. It breaks away from the constraints of traditional CI/CD systems and aligns directly with the principles of containerization and Kubernetes-native development.

This blog will take an in-depth look at Dagger, how it reimagines the CI/CD experience, and why it is particularly beneficial for developers and platform engineers working in Kubernetes-native ecosystems. We will explore how it works, its advantages over traditional CI/CD tools, and why it represents a fundamentally better model for building modern pipelines.

A Fresh Perspective on DevOps
The Problem with Traditional CI/CD Tools

Traditional CI/CD systems like Jenkins, GitHub Actions, GitLab CI, and CircleCI have served developers well for years, but they come with a set of limitations that become increasingly painful in large-scale, Kubernetes-native, cloud-first organizations. These tools often rely heavily on YAML-based configuration files, are difficult to test locally, suffer from environment drift, and tie users to specific platforms, leading to inflexible and inconsistent workflows.

Imagine spending hours debugging a CI pipeline, only to realize that it works on your local machine but not in the CI environment due to subtle differences in configuration, dependency versions, or file paths. Developers often find themselves pushing commits just to "test" their pipelines. Worse, these platforms rarely offer a reusable and portable experience that fits naturally within the software development lifecycle.

Enter Dagger: Reimagining CI/CD for the Kubernetes Era

Dagger was created to tackle these issues head-on. Instead of forcing developers into a rigid declarative DSL or complex YAML syntax, Dagger allows you to define your pipelines using general-purpose programming languages such as Go, Python, TypeScript/Node.js, and CUE. These languages are familiar to developers and offer full programming expressiveness, conditional logic, loops, functions, error handling, modularity, things YAML simply can’t do efficiently.

At its core, Dagger uses containers to run each pipeline step in isolation. These steps execute within the Dagger Engine, a containerized runtime that leverages BuildKit, Docker’s high-performance build system. This container-first approach ensures that your pipelines are consistent, repeatable, and environment-independent, eliminating "it works on my machine" scenarios.

By treating pipelines as code and containers as the unit of execution, Dagger is not just an improvement, it’s a radical reinvention of how CI/CD should work in a Kubernetes-native DevOps world.

How Dagger Works: Pipeline‑as‑Code, Container‑Powered
1. Write Pipelines in Real Programming Languages

At the heart of Dagger is the idea of CI/CD as code. Rather than encoding your build, test, and deploy logic in verbose YAML files or proprietary DSLs, Dagger lets you use your preferred programming language to define pipelines. This unlocks several key benefits:

  • Developer familiarity: Use Go, Python, or Node.js, the same languages used in your application code, to define pipelines.

  • True logic support: Use conditionals, variables, loops, imports, and functions for advanced control over your CI/CD flow.

  • Improved readability and maintainability: Code is more maintainable than YAML, especially for complex workflows.

Here’s a simple example in Go:

This pipeline clones the local code directory, builds the Go binary inside a container, and exports the compiled artifact. With this approach, pipelines become first-class citizens of your codebase, version-controlled, testable, and modular.

2. Run Wherever Docker (or Kubernetes) Is Available

Another core strength of Dagger is its location-agnostic execution. Pipelines are defined in code but executed through the Dagger Engine, which runs inside an OCI-compliant container. This means the same pipeline can be executed:

  • On a developer’s laptop during local development

  • Inside GitHub Actions, GitLab CI, or any CI provider

  • As a Kubernetes job or DaemonSet inside a cluster

Unlike traditional CI systems where moving pipelines between environments requires retooling, Dagger pipelines are completely portable and environment-independent. This eliminates environment drift and dramatically simplifies debugging.

In Kubernetes-native CI/CD workflows, the Dagger Engine can be deployed as a pod, job, or even DaemonSet, leveraging container orchestration and cluster-wide caching for optimal speed and efficiency.

3. Enjoy Universal Caching and Artifact Reuse

Performance is a major pain point in CI/CD. Rebuilding the same dependencies or re-running unchanged steps wastes time and compute. Dagger addresses this by deeply integrating BuildKit’s advanced caching system.

Every step in a Dagger pipeline produces cached artifacts, whether it’s compiled binaries, Docker layers, or intermediate files. When re-running pipelines (locally or in CI), Dagger checks its cache and skips redundant steps automatically.

In Kubernetes environments, you can deploy shared Dagger Engines with persistent volumes or object storage-based caches. This allows teams to reuse build artifacts across jobs, branches, or teams, drastically reducing build times and cloud costs. In practice, teams often see 2× to 10× faster pipelines after the first run.

This approach to CI/CD caching is inherently more reliable and scalable than manually setting up Docker layer caching or dependency caching in traditional CI systems.

4. Portable Pipelines with Zero CI Lock‑In

One of Dagger’s most compelling features is its CI-agnostic architecture. The pipelines you write are not tied to any particular platform or provider. Whether you use GitHub Actions, GitLab, Jenkins, or a GitOps tool like ArgoCD or Flux, the same pipeline logic can be reused and shared across systems.

This gives you complete freedom from CI/CD lock-in. You’re not rewriting YAML every time you migrate tools or platforms. Your infrastructure choices don’t constrain your pipelines. Your workflows stay consistent and portable, no matter where they’re run.

You can even invoke Dagger pipelines from the command line, within cron jobs, or via webhooks, providing flexibility in how and when they’re triggered. This portability is invaluable in today’s hybrid cloud and multi-environment workflows.

Benefits for Developers & Platform Engineers
• True Dev/CI Parity

One of the most frustrating experiences for developers is when code behaves differently in CI than it does locally. Dagger eliminates this problem by making the local execution environment identical to CI. The same containers and pipeline logic are used in both places, which means what works on your machine really will work everywhere.

Developers can run and debug pipelines on their laptops, validate changes instantly, and push with confidence, knowing that the CI system will execute the exact same steps.

This developer-friendly CI/CD model leads to faster iteration, fewer broken builds, and a far more productive engineering workflow.

• Language‑Native Authoring

Traditional CI tools force developers to learn and maintain CI-specific languages (Jenkins Groovy, GitHub YAML, GitLab’s CI DSL). Dagger flips this by letting you author pipelines using general-purpose programming languages, Go, Python, TypeScript, and more.

This shift has several benefits:

  • Developers don’t need to context switch or learn new syntax.

  • You can use language features like error handling, testing, and abstraction.

  • You can package and share pipelines as libraries and modules.

In short, Dagger treats CI/CD pipelines as software, not configuration. This improves testability, maintainability, and team velocity.

• Consistent, Cross‑Platform Operations

Because Dagger runs all pipeline steps in standard OCI containers, every operation, whether building, testing, linting, or deploying, is isolated and reproducible.

This eliminates environment drift and ensures cross-platform consistency. Your build works the same across macOS, Linux, CI, or Kubernetes. You’re no longer debugging obscure platform issues or dependency mismatches.

Containers also provide fine-grained control over runtime environments. Need to run a step in Node.js 20, then another in Python 3.11? Just use different containers. Dagger makes it easy.

• Optimized Performance at Scale

CI/CD pipelines often suffer from slow build times, redundant computations, and wasted compute. Dagger solves this by:

  • Using BuildKit’s layer caching to skip unchanged steps.

  • Running parallel steps where possible.

  • Sharing cache across builds in Kubernetes-native environments.

With these optimizations, developers enjoy faster feedback loops. Platform teams reduce cloud costs by avoiding unnecessary rebuilds. For large projects or monorepos, this can translate into hours saved every day.

• Modular & Reusable Pipelines

Dagger encourages a modular architecture for pipelines. You can break your workflow into reusable components, like a build step, a test runner, a Docker publisher, and import them across projects.

This composability means:

  • Teams can maintain shared pipeline libraries.

  • You avoid duplicating logic across services.

  • Updates and fixes propagate automatically.

Modular pipelines are also easier to test, document, and maintain, leading to better reliability and engineering productivity.

• Platform‑Centric CI/CD

Finally, Dagger is built for platform engineering. It integrates cleanly with Kubernetes, supports containerized runners, and scales using the same infrastructure principles you apply to applications.

You can deploy Dagger Engines in clusters, scale them with Kubernetes auto-scaling, and manage storage and caching via volumes or object stores.

For platform teams, this means:

  • Easier maintenance of pipeline infrastructure

  • Better resource utilization

  • Seamless CI/CD integration with GitOps, ArgoCD, Vault, and more

Dagger is the perfect match for Kubernetes-native CI/CD, whether you’re building internal platforms, running multi-cloud workloads, or enabling self-service for developer teams.

Developer Experience: A Use Case

Let’s take a practical walk through a developer’s workflow with Dagger.

  1. Local Iteration
    A developer starts by writing a pipeline script in Go. They can run go run pipeline.go to instantly build, test, lint, and package their app using Docker containers on their laptop. This enables fast feedback without waiting for CI.

CI Integration
The same pipeline script is invoked in GitHub Actions. The CI config looks like this:

steps:

  - uses: actions/checkout

  - run: go install dagger.io/dagger@latest

  - run: go run pipeline.go

  1.  No new logic. No YAML duplication. The same pipeline runs as part of the CI build.

  2. Kubernetes Execution
    When deployed to a Kubernetes-native CI system (or a GitOps pipeline), the Dagger Engine runs as a DaemonSet. Pipelines execute inside pods using shared caches. Auto-scaling ensures that builds can run in parallel, maximizing speed and minimizing compute waste.

This end-to-end consistency, from dev to CI to Kubernetes, ensures fewer surprises, fewer bugs, and happier developers.

Advantage Over Traditional CI

Compared to legacy tools like Jenkins or even modern YAML-based solutions, Dagger offers major advantages:

  • No YAML lock-in: Use Go, Python, or Node.js for portable, expressive pipeline logic.

  • Run locally and in CI: True dev-to-CI parity.

  • Built-in caching: Faster builds, lower costs.

  • Cross-platform and cloud-native: Designed for Kubernetes-native DevOps.

  • Composable and reusable: Pipelines as libraries, not monoliths.

  • CI platform agnostic: GitHub, GitLab, Jenkins, or your laptop, same pipeline.

In short, Dagger offers a smarter, faster, and more scalable way to do CI/CD, designed specifically for today’s cloud-native development landscape.

Connect with Us