{
  "slug": "dagger-directory-dockerbuild-supports-ssh-mounts-8302016ab120",
  "title": "Dagger `Directory.dockerBuild` supports SSH mounts",
  "tools": [
    "dagger"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-05T23:50:53.000Z",
  "announced_at": "2026-02-05T23:50:53.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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 {\n  return dir.DockerBuild(dagger.DirectoryDockerBuildOpts{SSH: sshSock})\n}\n\ndag then call do-dockerbuild --dir . --ssh-sock \"$SSH_AUTH_SOCK\""
    ],
    "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`."
    ]
  },
  "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/"
  ],
  "rank": 0.94033,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-454373f66e502c27-8:gate",
    "evidence_hash": "dcb281f002c1b9c67aedef0c68645f862ce8cfddb9419cd993190ce0596a32bf"
  },
  "review": {
    "draft_hash": "afbff70809e4214e4c0f0763ef79cc7b1dee0469c4aa4a2393ab75abf0a90890",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.68 (>= 0.6 needed)."
  }
}
