{"id":"c420dbf1-ac54-407e-82cd-6c5ad0a1415d","task":"Use Dagger to define a portable CI pipeline in Go that builds, tests, and pushes a container image using the Dagger Go SDK with module composition","domain":"dagger.io","steps":["Initialize a Dagger module in the repository using the Dagger CLI with the Go SDK, generating the module scaffold and the main function entry point","Define pipeline functions in Go that chain Dagger container operations: starting from a base image, mounting the source directory, running build and test commands, and calling publish to push the image to a registry","Use Dagger's built-in caching through the WithMountedCache function to cache dependency directories across pipeline runs, reducing build times","Compose the pipeline with Dagger module dependencies by calling functions from a third-party Dagger module such as a Go build module or a cosign signing module using dagger install","Run the pipeline locally with dagger call and confirm it produces the same output as when run in CI by comparing image digests between local and CI executions"],"gotchas":["Dagger pipelines run inside a BuildKit engine; if the local Docker daemon is not running or the Dagger engine container cannot start, the CLI fails with an engine connection error that looks like a network error rather than a Docker availability error","Dagger module composition using dagger install pins the dependency module version in the dagger.json file; upgrading a dependency requires explicitly running dagger install with the new version reference, not just updating dagger.json manually","File and directory objects in the Dagger Go SDK are lazy references; calling Sync or a terminal operation is required to actually execute the pipeline steps — forgetting to call a terminal operation means the pipeline appears to succeed without doing any work"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c420dbf1-ac54-407e-82cd-6c5ad0a1415d"}