Accelerate Your Development and CI/CD Pipelines with Dagger

Márk Sági-Kazár


2025-06-05 @ KCD Czech & Slovak

whoami

Márk Sági-Kazár

Cloud Native Ambassador

Dagger Commander


YAML engineer for life 😭



@sagikazarmark

https://sagikazarmark.com

hello@sagikazarmark.com

📋 Agenda

  • 🗣️ Why are we here?
  • 📚 Module 1: Let’s Daggerize
  • 📚 Module 2: Working with modules
  • 📚 Module 3: Publishing artifacts
  • 📚 Module 4: Integrating with GitHub Actions
  • ❓Q&A
  • 🎁 Surprise (if time allows)

📈 Accelerate

= room for improvement

🔀 Environment drift

Developer environment

brew install go
nix-env -i gotestsum
sudo apt-get install golangci-lint

make build
just test
task lint

What version of Go did you just install?

CI/CD environment

- uses: actions/setup-go@v5
  with:
    go-version: "1.24.0"

- run: go build .
- run: go test -race -v ./…

- uses: golangci/golangci-lint-action@v8
  with:
    version: "v2.1.0"

Artifacts

FROM golang:1.23 AS go

RUN go build -o app .


FROM alpine

COPY --from=go /app /usr/local/bin/

Why is this a problem?

  • Maintenance burden
  • Hidden bugs
  • Undermines trust in processes 1
  • Onboarding friction

💡 Unified environments

Dev + CI/CD + Artifacts = software delivery pipelines/workflows

I wish there was…

Is docker run the answer?

It gives you containers…

…but not workflows.

🙏 Push’n’Pray

💡 Portable workflows

Run the same workflow:

  • in dev
  • in CI
  • anywhere

No more Push’n’Pray

  • ⌛ Shorter feedback loop
  • 💸 Less CI resources wasted 1
  • 🤯 You maintain your sanity

✍️ YAML

Day 1…

name: CI

on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - run: |
          build
          test
          lint

Day 101

700+ lines of YAML & Bash chaos

# Foobar pipeline
# Include the Common CI pipeline parameters.
include:
  - project: 'foo/bar/foobarproject/cicdtemplate'
    file: '/Common.gitlab-ci.yml'
  #- /force-app/ui-tests/pipeline.yml

stages:
  - build-metadata-package
  - run-js-tests
  - validate-package
  - deploy-package
  - run-unit-tests
  - run-api-tests
  - run-ui-tests
  - integration

####################################################
# Builds the Metadata Package, builds the Package
# files and Destructive changes
####################################################
build-metadata-package:
  stage: build-metadata-package
  except:
    ...

🤔 How did we end up in this mess?

  • YAML is a data serialization language
  • Workflows are not strictly declarative

YAML…

  • is not reusable 1
  • is not composable
  • provides poor control flow
  • is not portable (vendor lock-in)

YAML is a poor choice of language for software delivery workflows.

How about using a real programming language?

How about using a programming language you already know?

Example (pseudo code)

func build() Binary {
    return go.Build(".")
}

func push() {
    ctr := newContainer().
        copy("/app", build())

    pushContainer(ctr)
}

👍 Ideal solution

🔀 Environment drift

🙏 Push’n’Pray

✍️ YAML

→ Unified environments

→ Portable workflows

→ Programmable workflows

Dagger Functions

  • Write your workflows as code
  • Orchestrate containers
  • Run them anywhere 1

Workshop

Let’s get our hands dirty!

Workshop environment


  1. Go to https://labs.iximiuz.com
  2. Sign in with GitHub
  3. Go to the training URL

skm.li/kcd-cz-sk-25/play

Prerequisites

  • Make sure Docker is installed and running.
  • Make sure Go is installed.
  • Install the latest Dagger CLI.
  • Make sure you have a GitHub account set up with SSH keys.
  • Last, but not least: you’ll need your favorite text editor or IDE.

Workshop materials

https://github.com/sagikazarmark/workshop-kcd-czsk-2025

skm.li/kcd-cz-sk-25

🔭 Dagger in the Wild

github.com/openmeterio/openmeter

github.com/twirphp/twirp

Any questions?

👋 Thank you

Stay in touch!



@sagikazarmark

https://sagikazarmark.com

hello@sagikazarmark.com

🎮 Game

Guess which image is AI generated.

AI generated

AI generated

Original

AI generated

AI generated

Original

AI generated

Original

🎮 Thanks for playing!