{
  "id": "docker-build-secrets-table",
  "kind": "table",
  "slug": "docker-build-secrets",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/docker-build-secrets/",
  "title": "Pass secrets to docker build with --secret and RUN --mount=type=secret, not ARG or ENV",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "id",
      "source": "Docker docs",
      "detail": "defaults to the basename of the target path."
    },
    {
      "name": "target",
      "source": "Docker docs",
      "detail": "changes the file path; by default the secret is mounted to /run/secrets/<id>."
    },
    {
      "name": "env",
      "source": "Docker docs",
      "detail": "mounts the secret to an environment variable instead of a file, or both."
    }
  ],
  "related_slugs": [
    "docker-build-cache",
    "docker-multi-stage-builds",
    "docker-build-context"
  ],
  "license": "CC-BY-4.0",
  "source_license": "Apache-2.0 (Docker docs); Apache-2.0 (Docker docs); prose restates cited source lines in own words",
  "as_of": "2026-11-18",
  "status": "fill-draft-20261118",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}