rycus86 / githooks

Githooks: per-repo and global Git hooks with version control
MIT License
380 stars 19 forks source link

Question: Githooks and Docker #162

Open gabyx opened 1 year ago

gabyx commented 1 year ago

Hi rycus:

I came across the following trouble:

https://stackoverflow.com/questions/75759907/githooks-run-inside-docker-with-git-add-leads-to-index-lock-troubles

maybe you have any idea how to solve this.

I guess its not possible. Do you might have an idea?

BR

rycus86 commented 1 year ago

Hello!

Looks like you've got an answer there already, I'd also expect permission issues when the root user interacts with the .git contents. As suggested, mounting the passwords file and setting the user should work, something like --user $(id -u)