---
schema_version: 1
route: /t/dagger.md
tool: "dagger"
---

# sincecutoff.com /t/dagger — Dagger

- name: Dagger
- kind: cli
- children: none
- homepage: <https://github.com/dagger/dagger>

Changes to the tools coding agents drive, since a model's training cutoff, each linked to its first-party source. Check installed versions and limitations before acting; a cutoff date does not establish what a model knows.
Original editorial content: [Apache 2.0](https://sincecutoff.com/v1/data-license.txt), by [0xPatrick](https://0xpatrick.dev). Preserve applicable license and [NOTICE](https://sincecutoff.com/notice.txt) attribution when redistributing. Third-party source text and examples retain their own rights. [License scope and attribution](https://sincecutoff.com/v1/license.json).
To stay current, read the changes feed: [`/v1/changes.md?tool=dagger`](https://sincecutoff.com/v1/changes.md?tool=dagger) (or `.json`), adding `since=YYYY-MM-DD` for your training cutoff. Entries for registered children are included; the registry itself is `/v1/tools.json`. How to page and save your place: [llms.txt](https://sincecutoff.com/llms.txt).

### dagger Container.from and Container.publish support registryService (2026-06-11)
- slug: dagger-container-from-and-container-publish-support-registryservice-9a5e9c25b697
- score: 0.96

How to use it:

When using a Dagger Service as the image registry, pass it as `RegistryService` to `Container.From` or `Container.Publish`. This selects that service for the registry operation without starting unrelated services attached to the container.

Examples:

```
_, err := dag.Container().WithNewFile("/hello.txt", "hello").Publish(ctx, "<registry-host>:5000/<image>:<tag>", dagger.ContainerPublishOpts{RegistryService: registry})
```

```
container := dag.Container().From("<registry-host>:5000/<image>:<tag>", dagger.ContainerFromOpts{RegistryService: registry})
```

- why_it_matters: Use a Dagger Service as the registry when pulling a container image or publishing one to a local ephemeral registry.
- before: Before the explicit option, the implementation used services attached to the container for registry operations, which could start unrelated attached services.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.21.6>, <https://github.com/dagger/dagger/pull/13305/files>, <https://github.com/dagger/dagger/pull/13305>
- gotchas: "Version: v0.21.6"; "address (required): Image reference used for the pull or push; its registry hostname must match the Service binding alias."; "registryService: The Dagger Service used as the registry endpoint; only this service is started for the pull or push. It is an option on both `Container.from` and `Container.publish`."; "Prerequisite: Use Dagger v0.21.6 or later for the `registryService` options."; "Prerequisite: Provide a Dagger Service for the registry and use an image reference whose registry hostname matches the service binding alias."

### Dagger container.exists adds an expand option (2026-06-10)
- slug: dagger-container-exists-adds-an-expand-option-6909c7c4d812
- score: 0.94

How to use it:

When checking whether a container path exists, set `expand: true` to expand `$VAR` or `${VAR}` using the container’s environment variables. `expand` defaults to `false`.

Examples:

```
query { container { exists(path: "/$VAR/foo", expand: true) } }
```

- why_it_matters: Check whether a container exists while accounting for expanded container state.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.21.5>, <https://github.com/dagger/dagger/pull/13310>, <https://github.com/dagger/dagger/blob/v0.21.5/core/schema/container.go>
- gotchas: "Version: v0.21.5"; "path (required): Path to check, such as `/file.txt`."; "expand: Boolean; defaults to `false`. When true, expands `$VAR` or `${VAR}` in `path` using the container’s environment variables."; "expectedType: If specified, also validates the file type; allowed values include `REGULAR_TYPE`, `DIRECTORY_TYPE`, and `SYMLINK_TYPE`."; "doNotFollowSymlinks: If specified, do not follow symlinks."

### dagger check includes generated-file freshness checks (2026-05-26)
- slug: dagger-check-includes-generated-file-freshness-checks-2502dcbf8098
- score: 0.95

How to use it:

When checking generated files for staleness in Dagger v0.21.0, run `dagger check`; it exposes a check for each `generate` function. Use `dagger check --no-generate` to list or run only explicitly marked checks.

Examples:

```
dagger check
```

```
dagger check --no-generate
```

- why_it_matters: When checking whether generated files in a Dagger project are up to date, run the generated checks.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.21.0>
- gotchas: "Version: v0.21.0"; "--no-generate: Excludes generated checks; lists or runs only explicitly marked checks."; "ignoreChecks: Toolchain setting to skip creating checks for specified `generate` functions; documented values or sub-keys not found."; "Docs conflict: Newer Dagger checking documentation uses `--generate` to select generated checks and `--no-generate` for annotated checks; the later documentation's `--generated` option also differs from the v0.21.0 release note. https://docs.dagger.io/cli/checking/"

### dagger workspace lockfiles support selected lookups (2026-05-26)
- slug: dagger-workspace-lockfiles-support-selected-lookups-5322bc755080
- score: 0.92

How to use it:

When a Dagger workspace needs reproducible selected lookups, run with `--lock live`, `--lock pinned`, or `--lock frozen` to control lookup resolution. Run `dagger lock update` to refresh recorded entries; in v0.21.0 it also creates `.dagger/lock` when missing.

Examples:

```
dagger --lock live <command> [arguments...]
```

```
dagger --lock pinned <command> [arguments...]
```

```
dagger --lock frozen <command> [arguments...]
```

- why_it_matters: When you need reproducible selected lookups such as `container.from` or Git refs in a Dagger workspace, configure and update workspace locks.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.21.0>
- gotchas: "Version: v0.21.0"; "--lock live: Opts into live resolution and records live values."; "--lock pinned: Opts into using recorded pins where available and resolving the rest live."; "--lock frozen: Opts into resolution only from `.dagger/lock`."; "dagger lock update: Refreshes entries already recorded in `.dagger/lock`; creates the file when it is missing."; "Locking is opt-in."; "The lockfile applies to selected lookups such as `container.from` and Git refs."; "Docs conflict: Current Dagger lockfile documentation describes `dagger.lock` and newer lock-mode behavior; it differs from v0.21.0's `.dagger/lock` paths, so newer behavior was excluded."

### dagger check and SDKs add fail-fast support (2026-04-09)
- slug: dagger-check-and-sdks-add-fail-fast-support-292350229c44
- score: 0.92

How to use it:

When validating a repository, run `dagger check --failfast` to cancel remaining checks after the first failure.

Examples:

```
dagger check --failfast
```

- why_it_matters: Stop a Dagger check run after a failure when validating a repository.
- before: By default, every check runs so all failures are reported.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.20.4>, <https://docs.dagger.io/cli/checking/>
- gotchas: "Version: v0.20.4"; "--failfast: Cancel remaining checks on the first failure."; "Docs conflict: The current CLI reference documents `--fail-fast`; the v0.20.4 release note and official checking page document `--failfast`. Used the release-era spelling."

### dagger up starts module-defined services on the host (2026-04-09)
- slug: dagger-up-starts-module-defined-services-on-the-host-fa156746a332
- score: 0.92

How to use it:

When a Dagger module defines a service function marked with `@up` (or the SDK equivalent), run `dagger up` to start its services and expose their ports on the host. Configure `portMappings` when a toolchain service needs a different host port.

Examples:

```
dagger up
```

```
dagger up -l
```

```
{"toolchains":[{"name":"<toolchain>","portMappings":{"<service>":["<host-port>:<service-port>"]}}]}
```

- why_it_matters: Start a module-defined service on the host while developing a Dagger module.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.20.4>, <https://github.com/dagger/dagger/pull/11959>
- gotchas: "Version: v0.20.4"; "Availability: experimental"; "@up / `+up` (required): Mark a function returning `Service` for `dagger up`; SDK syntax varies."; "`portMappings`: Toolchain config object mapping service names to port mapping strings in `hostPort:servicePort` form. Configure when remapping is needed."; "`services()`: Workspace API that aggregates services across workspace modules, with include/exclude filtering."; "Prerequisite: Expose service functions returning `dagger.Service`; annotate them with `+up` or the SDK-equivalent annotation for discovery."

### dagger --pretty=logs omits dots (2026-02-27)
- slug: dagger-pretty-logs-omits-dots-4b06b32d915a
- score: 0.92

How to use it:

When running a Dagger workflow without progress dots, select the `logs` progress format. In v0.20.0, the documented CLI flag is `--progress=logs`.

Examples:

```
dagger --progress=logs <command>
```

- why_it_matters: Run a Dagger workflow and display logs without progress dots.
- before: The release note describes `dots` as the prior comparison: it says `logs` works like `dots`, but without the dots.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.20.0>, <https://github.com/dagger/dagger/blob/v0.20.0/cmd/dagger/main.go>
- gotchas: "Version: v0.20.0"; "--progress: Selects the progress output format. v0.20.0 source lists `auto`, `plain`, `tty`, `dots`, and `logs`; the default is `auto`."; "--progress=logs: Selects the logs frontend."; "Docs conflict: The release note names `--pretty=logs`; the v0.20.0 CLI source documents `--progress` as the flag and lists `logs` as an accepted value."

### Dagger Changeset API merges changesets (2026-02-05)
- slug: dagger-changeset-api-merges-changesets-388beb9a196f
- score: 0.97

How to use it:

When combining changesets from module functions, call `withChangeset` for one changeset or `withChangesets` for several. Choose a supported `onConflict` value when conflicts need handling; the plural method supports only `FAIL` and `FAIL_EARLY` in v0.19.11.

Examples:

```
changeset.withChangeset(changes: <otherChangeset>, onConflict: <strategy>)
```

```
changeset.withChangesets(changes: [<otherChangeset1>, <otherChangeset2>], onConflict: <pluralStrategy>)
```

- why_it_matters: Combine changesets produced by module functions while resolving conflicting file changes.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.11>, <https://github.com/dagger/dagger/pull/11577>, <https://github.com/dagger/dagger/blob/v0.19.11/docs/docs-graphql/schema.graphqls>
- gotchas: "Version: v0.19.11"; "withChangeset.changes (required): Changeset to merge into the calling changeset."; "withChangeset.onConflict: Conflict strategy; defaults to `FAIL`. Allowed: `FAIL_EARLY`, `FAIL`, `LEAVE_CONFLICT_MARKERS`, `PREFER_OURS`, `PREFER_THEIRS`."; "withChangesets.changes (required): List of changesets to merge into the calling changeset."; "withChangesets.onConflict: Conflict strategy; defaults to `FAIL`. Allowed: `FAIL_EARLY` or `FAIL` only; the strategies are mutually exclusive enum values."; "Merging uses git under the hood."; "The linked description says conflicts raise an error by default; `onConflict` can be set to `fail`, `skip`, `preferSelf`, or `preferOther`."; "Docs conflict: The v0.19.11 schema documents `withChangeset` (singular) and `withChangesets` (plural); the card's `withChangset` spelling is not the documented method name."; "Docs conflict: `withChangesets` in v0.19.11 does not support all four card-listed strategies: its schema allows only `FAIL` and `FAIL_EARLY`. `withChangeset` uses the five values documented above."

### Dagger CLI runs generate functions and applies their changesets (2026-02-05)
- slug: dagger-cli-runs-generate-functions-and-applies-their-changesets-0b98b656ba36
- score: 0.98

How to use it:

When repository code generation is implemented as Dagger generator functions, mark each function with the SDK’s generate annotation and have it return a Changeset. Run `dagger generate` from the workspace to run generators and review and apply their combined changeset.

Examples:

```
dagger generate
```

- why_it_matters: Run repository code generation implemented as Dagger module functions and apply the resulting changesets.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.11>, <https://docs.dagger.io/reference/sdks/python/>, <https://github.com/dagger/dagger/blob/v0.19.11/CHANGELOG.md>, <https://docs.dagger.io/reference/sdks/typescript/>
- gotchas: "Version: v0.19.11"; "Go annotation: `// +generate` (required): Marks a Go function as a generator; it must return a Changeset."; "TypeScript decorator: `@generate()` (required): Marks a TypeScript function as a generator; it must return a Changeset."; "Python decorator: `@generate` (required): Marks a Python function as a generator; it must return a `dagger.Changeset`."; "Marked functions must expose a Changeset."

### Dagger `Directory.dockerBuild` supports SSH mounts (2026-02-05)
- slug: dagger-directory-dockerbuild-supports-ssh-mounts-8302016ab120
- score: 0.94

How to use it:

When a Dockerfile build step needs SSH authentication, pass an SSH socket to `Directory.dockerBuild`; its `RUN --mount=type=ssh` instruction can then use that socket.

Examples:

```
func (m *MyModule) DoDockerbuild(dir *dagger.Directory, sshSock *dagger.Socket) *dagger.Container {
  return dir.DockerBuild(dagger.DirectoryDockerBuildOpts{SSH: sshSock})
}

dag then call do-dockerbuild --dir . --ssh-sock "$SSH_AUTH_SOCK"
```

- why_it_matters: Build a repository image with Dockerfile steps that need SSH access, such as fetching private dependencies.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.11>, <https://github.com/dagger/dagger/pull/11793>, <https://docs.dagger.io/reference/typescript/api/client.gen/type-aliases/directorydockerbuildopts/>
- gotchas: "Version: v0.19.11"; "ssh: Optional `Socket` for SSH authentication during the build; typically obtained from `SSH_AUTH_SOCK` with `host.unixSocket()`."; "Prerequisite: Pass the socket explicitly as an API argument; the Dockerfile step uses it with `RUN --mount=type=ssh`."

### Dagger Java SDK supports checks with `@Check` (2026-02-05)
- slug: dagger-java-sdk-supports-checks-with-check-902417dc20cf
- score: 0.97

How to use it:

When a Java module function should validate a condition, annotate its method with both `@Function` and `@Check`. It must return `void` or throw an exception to indicate pass or failure, and can be invoked via `dagger check`.

Examples:

```
@Object
public class MyModule {
    @Function
    @Check
    public void validateBuild() {
        // Validate conditions; throw an exception on failure.
    }
}
```

- why_it_matters: Mark a Java module function as a check to validate its build or other repository operation.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.11>, <https://github.com/dagger/dagger/pull/11704>, <https://github.com/dagger/dagger/blob/v0.19.11/sdk/java/dagger-java-sdk/src/main/java/io/dagger/module/annotation/Check.java>
- gotchas: "Version: v0.19.11"; "@Check (required): Method annotation that marks a function as a check."; "@Function (required): Must be combined with `@Check` so the check is a callable function."; "Prerequisite: The check must be a callable function; the annotation documentation says it can be invoked via `dagger check`."; "Prerequisite: Checks return `void` or throw exceptions to indicate pass/fail."

### Dagger module Container arguments accept default addresses (2026-02-05)
- slug: dagger-module-container-arguments-accept-default-addresses-5aeac23ec550
- score: 0.97

How to use it:

When a Dagger Function takes a `Container` argument, set its `defaultAddress` so Dagger loads that image when the caller omits the argument. An explicitly supplied argument value overrides the default.

Examples:

```
// +defaultAddress="alpine:latest"
ctr *dagger.Container,
```

```
{
  "function": ["testWithDefaultContainer"],
  "argument": "ctr",
  "defaultAddress": "alpine:3.18"
}
```

- why_it_matters: Provide a default base image for a Container argument used by a repository build or test function.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.11>, <https://github.com/dagger/dagger/pull/11714>, <https://docs.dagger.io/0.19.11/getting-started/types/container/#default-addresses>
- gotchas: "Version: v0.19.11"; "defaultAddress (required): The container image address to load when this `Container` argument is not set; an explicitly passed argument overrides it."; "function (required): JSON customization field identifying the function by name; shown as an array containing `testWithDefaultContainer`."; "argument (required): JSON customization field naming the argument that receives the default address; shown as `ctr`."; "Prerequisite: The function argument must be of type `Container`; default addresses are only available for `Container` arguments."; "Default addresses are only available for `Container` arguments."; "An explicitly passed value overrides the default address."

### Dagger secret providers support AWS Secrets Manager and Parameter Store (2026-02-05)
- slug: dagger-secret-providers-support-aws-secrets-manager-and-parameter-store-064c96fc6e89
- score: 0.95

How to use it:

When a Dagger function accepts a `Secret`, pass an AWS secret URI for its argument: use `aws+sm://` for Secrets Manager or `aws+ps://` for Parameter Store.

Examples:

```
dagger call <function> --<secret-argument>=aws+sm://<secret-name>
```

```
dagger call <function> --<secret-argument>=aws+ps://<parameter-name>
```

- why_it_matters: Supply an AWS-managed secret to a Dagger function while building or testing repository code.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.11>, <https://github.com/dagger/dagger/pull/11728>, <https://docs.dagger.io/0.20/getting-started/types/secret/>
- gotchas: "Version: v0.19.11"; "<function> (required): Dagger function name; replace with the function that accepts the secret."; "--<secret-argument> (required): Named CLI argument corresponding to the function's `Secret` parameter."; "aws+sm://<secret-name> (required): URI scheme and secret name for AWS Secrets Manager."; "aws+ps://<parameter-name> (required): URI scheme and parameter name for AWS Systems Manager Parameter Store."; "Prerequisite: Configure AWS credentials through environment variables, the shared credentials file (`~/.aws/credentials`), or IAM role credentials."; "Prerequisite: Set the `AWS_REGION` environment variable."

### Dagger filesystem Stat calls (2026-01-07)
- slug: dagger-filesystem-stat-calls-a4bbac4afaff
- score: 0.96

How to use it:

When inspecting filesystem status in a Dagger module, call `directory.stat(path: <path>)` or `container.stat(path: <path>)`. Read the returned `Stat` fields for the status details documented for your API version.

Examples:

```
directory.stat(path: "/file.txt")
```

```
container.stat(path: "/file.txt")
```

- why_it_matters: Inspect a file or directory's filesystem status while implementing or debugging a Dagger module.
- sources: <https://github.com/dagger/dagger/releases/tag/v0.19.9>, <https://github.com/dagger/dagger/pull/11403>, <https://docs.dagger.io/0.19.11/reference/api/directory/>, <https://docs.dagger.io/0.19.11/reference/api/container/>, <https://docs.dagger.io/api/reference/>
- gotchas: "Version: v0.19.9"; "path (required): Path to stat; e.g. `/file.txt`."; "doNotFollowSymlinks: If true, do not follow symlinks; defaults to false."; "Stat.fileType: File type."; "Stat.name (required): File name."; "Stat.permissions (required): Permission bits."; "Docs conflict: The inspected official documentation is for Dagger v0.19.11, newer than the card's v0.19.9. The current API reference lists `fileType`, `name`, and `permissions` on `Stat`; it does not list a size field. This differs from the release note's example of status including size, so size is omitted."
