Content-Length: 309420 | pFad | https://github.com/pre-commit/pre-commit/issues/1243

FA Permission issue with rootless containers · Issue #1243 · pre-commit/pre-commit · GitHub
Skip to content

Permission issue with rootless containers #1243

Description

@dkolepp

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.
image

If, however, I remove the -u option from the source code (locally, languages/docker.py, docker_cmd()), then the hook runs fine:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/pre-commit/pre-commit/issues/1243

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy