Skip to content

Instantly share code, notes, and snippets.

import { dag, Container, Directory, object, argument, func } from "@dagger.io/dagger"
@object()
export class Book {
source: Directory
// Automatically uses "." as the default source directory
constructor(
@argument({ defaultPath: "." }) source: Directory,
) {
package main
import (
"context"
"fmt"
"math/rand"
"time"
"dagger/book/internal/dagger"
)
name: dagger
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
import random
import dagger
from dagger import dag, function, object_type, Directory, Container
@object_type
class Book:
@function
def env(self, source: dagger.Directory) -> dagger.Container:
@vikram-dagger
vikram-dagger / workshop.md
Last active October 17, 2025 07:13
Dagger Workshop - Prerequisites and Setup

Welcome to Dagger!

Hello, and welcome to the Dagger workshop!

This document gives you all the information you need to get your laptop configured and ready to code with Dagger!

Agenda

In this 90-minute workshop, you will build a simple CI pipeline for a GitHub project using Dagger. You will: