-
-
Notifications
You must be signed in to change notification settings - Fork 898
Closed
Description
I tried to use a docker_image
hook on a RHEL7.7 system using podman
with the podman-docker
package installed [This setup allows for rootless containers]. The hook attempts to modify the file, but gets a "permission denied" error. From looking at the source code, I see that pre-commit
is roughly trying to execute:
docker run -u $(id -u):$(id -g) -v $(pwd):/src:rw,Z --workdir /src -it <ENTRY> <FILE>
The hook does try to run, but results in permission error.
If, however, I remove the -u
option from the source code (locally, languages/docker.py, docker_cmd()), then the hook runs fine:
someth2say, jonasbb, themr0c, jwillikers, theherk and 2 more