Skip to content

fatal: detected dubious ownership in repository at '/var/www/doc-base' #4380

@pereorga

Description

@pereorga

It happens when I run make on a clean branch on this repo:

/dev/doc-en$ make
docker build .docker -t php/doc-en
[+] Building 6.0s (5/12)                                                                                                        docker:default
 => [internal] load build definition from Dockerfile                                                                                      0.0s
 => => transferring dockerfile: 685B                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/php:8.2-cli                                                                            1.6s
 => [internal] load .dockerignore          
[...]
 => exporting to image                                                                                                                   0.8s
 => => exporting layers                                                                                                                  0.8s
 => => writing image sha256:7d2764eca497e1282db787a4c1ed74824f010d8b0fa10638d6040657d689a061                                             0.0s
 => => naming to docker.io/php/doc-en                                                                                                    0.0s

 1 warning found (use docker --debug to expand):
 - JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 18)
touch .docker/built
docker run --rm -v .:/var/www/en -w /var/www -u 1000:1000 php/doc-en
configure.php on PHP 8.2.27

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

	git config --global --add safe.directory /var/www/doc-base
doc-base/temp clean up FAILED.
make: *** [Makefile:22: xhtml] Error 1

Reproduced on both Ubuntu 24.04.1 and macOS.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions