richarvey / nginx-php-fpm

Nginx and php-fpm for dockerhub builds
https://hub.docker.com/repository/docker/richarvey/nginx-php-fpm/general
GNU General Public License v3.0
1.66k stars 852 forks source link

/usr/bin/pull fails: "fatal: detected dubious ownership" #290

Open hactar opened 12 months ago

hactar commented 12 months ago

I try to run the command sudo docker exec -t -i containername /usr/bin/pull from the :latest image.

When I do I get an error:

fatal: detected dubious ownership in repository at '/var/www/html'
To add an exception for this directory, call:

    git config --global --add safe.directory /var/www/html

Checking the permissions they are:

f34e727608f2:/var/www/html# ls -lah
total 204K   
drwxr-xr-x    1 nginx    nginx       4.0K Oct 23 21:58 .
drwxr-xr-x    1 root     root        4.0K Jun 10 19:59 ..
drwxr-xr-x    8 nginx    nginx       4.0K Oct 23 21:58 .git

The container does not have any volume attached.

rahulmr commented 9 months ago

Encountered same issue, please fix if possible.