-
-
Notifications
You must be signed in to change notification settings - Fork 870
Open
Description
After running docker compose up --wait
several files and directories inside the project (including /app inside the php container) are created as root, not as my local user.
This leads to multiple problems:
- Git refuses to operate inside /app
The php container reports:
fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:
git config --global --add safe.directory /app
- Composer fails to install dependencies
Composer is unable to resolve multiple dependencies due to missing Symfony packages that are not loaded correctly (likely caused by Git + permission issues):
Problem 1
- Root composer.json requires runtime/frankenphp-symfony * -> satisfiable by runtime/frankenphp-symfony[0.1.0, 0.1.1, 0.2.0].
- runtime/frankenphp-symfony[0.1.0, ..., 0.1.1] require symfony/dependency-injection ^5.4 || ^6.0 -> found symfony/dependency-injection[v5.4.0, ..., v5.4.48, v6.0.0, ..., v6.4.26] but these were not loaded, likely because it conflicts with another require.
- runtime/frankenphp-symfony 0.2.0 requires symfony/dependency-injection ^5.4 || ^6.0 || ^7.0 -> found symfony/dependency-injection[v5.4.0, ..., v5.4.48, v6.0.0, ..., v6.4.26, v7.0.0, ..., v7.4.0] but these were not loaded, likely because it conflicts with another require.
- .env file cannot be found
grep: .env: No such file or directory
- Cannot open bin/console
Could not open input file: bin/console
Below you can see a screenshot of the docker container logs and the directory in host:
_Docker container logs_
File directory
Expected Behavior
Files created during docker compose up --wait should be owned by the same user as the one running the command, or by UID/GID that matches the configured PHP container user (default: 1000:1000).
Git should not reject the repository due to ownership issues.
Composer should be able to install all dependencies successfully.
Metadata
Metadata
Assignees
Labels
No labels
