This issue comes down to UID/GID mismatches between Jenkins (UID 1000) in the container and the VM user “dave.” A bind-mount alone won’t fix permissions, it just makes the host’s filesystem visible inside the container.
Two reliable solutions:
Shared group approach (recommended): Add both users to a common group, set the repo/build folder group ownership, and make it group-writable. This way both Jenkins and “dave” can write without constant ownership changes.
UID/GID mapping: Run the Jenkins container with the same UID as “dave,” so file ownership aligns naturally. This avoids permission conflicts, but requires adjusting container run options.
Bindfs can also help by remapping ownership on the fly, but it adds overhead and complexity compared to simply managing users/groups.
If you want minimal disruption and future maintainability, the shared group method is the most straightforward.