fix(hooks): mount cargo target outside bind mount via CARGO_TARGET_DIR #72
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dev-371-precommit-host-owned-target"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
In the
pre-commit:recipe'smountslist, mount the cargo target named volume at/cargo-target(outside the/buildbind mount) and point cargo at it via--env CARGO_TARGET_DIR=/cargo-target, instead of nesting it at/build/target.Why (DEV-371)
Nesting the cargo-target named volume under the
/buildbind mount makes the Docker daemon create a root-owned./targetdirectory on the host, which then needssudoto remove and breaks clean-clone workflows. Moving the cache outside the bind mount and redirecting cargo withCARGO_TARGET_DIRkeeps the persistent named-volume cache while leaving the host working tree untouched.This is the governance Option A standard. The registry and git volumes are unchanged.