Fix 'detected dubious ownership in repository' error in Docker build and run process #4645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request solves the problem
fatal: detected dubious ownership in repository at ...
when executing the make command. This was solved by passing the UID and GID of the host user as build arguments and adjusting the ownership of the cloned repository in the Dockerfile.Steps to reproduce
Precondition: Ensure that the doc-base and phd repositories are not cloned in directories adjacent to this directory.
Run the following command in the project root directory:
This will trigger the Docker build and run process, which previously resulted in the "detected dubious ownership in repository" error.
Changes
UID
andGID
build arguments in the Makefile docker build command./var/www/phd
and/var/www/doc-base
directories.Verification
make
completes successfully without the dubious ownership error.Note to reviewers
I'm new to contributing to this repo, so please bear with me.
If you have any feedback or suggestions, I'd really appreciate it!