{
  "slug": "bake-resolves-files-relative-to-the-bake-file-ba5618640ace",
  "title": "Bake resolves files relative to the bake file",
  "tools": [
    "buildx"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-29T20:27:12.000Z",
  "announced_at": "2026-07-29T20:27:12.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When Bake file paths should resolve from the file that defines them, set `BUILDX_BAKE_FILE_RELATIVE_PATHS=true` and run Bake. The setting applies to local directory paths in `target.context` and `target.contexts`; use `cwd://` for paths that should stay relative to the working directory.",
    "examples": [
      "BUILDX_BAKE_FILE_RELATIVE_PATHS=true docker buildx bake -f <bake-file> [<target>...]"
    ],
    "gotchas": [
      "Version: v0.36.0",
      "BUILDX_BAKE_FILE_RELATIVE_PATHS (required): Set to `true` to enable file-relative path resolution. The v0.36.0 release note uses `true`; the tagged reference documents the equivalent setting as `1`.",
      "-f, --file <file>: Select the Bake definition file; Bake searches the current working directory if omitted.",
      "Prerequisite: Use Buildx v0.36.0 or later for this change."
    ]
  },
  "why_it_matters": "Run Bake when file paths should resolve from the bake file's location instead of the current working directory.",
  "before": "By default, local directory build contexts in Bake files resolve from the current working directory.",
  "sources": [
    "https://github.com/docker/buildx/releases/tag/v0.36.0",
    "https://github.com/docker/buildx/blob/v0.36.0/docs/bake-reference.md",
    "https://docs.docker.com/reference/cli/docker/buildx/bake/"
  ],
  "rank": 0.9403,
  "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": "wave1-20261014",
    "verdict_id": "wave1-20261014:wave1-20261014-56383580c1b4ca00-3:gate",
    "evidence_hash": "f64755f629b0eb8538fd4a868ef6e21f39e7e5c40f2661e4e032ef450178790e"
  },
  "review": {
    "draft_hash": "b7980e948b1338d1a9490785051f44302277513d39eaba57483dd5a94e525230",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1-20261014:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
