-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-compose fails to run CodeChecker server with permission denied #3458
Comments
If you do not mount a workspace directory, and you run a CodeChecker container with a default user (root) and the default entry point the container will do the following steps:
Second use case is that when you mount a directory for So if you want to mount a directory to the |
@csordasmarton For the sake of this discussion, I am using a third use case as documented. I am using docker-compose in a fresh environment with no pre-existing volumes. docker-compose has docker create an empty docker volume and mounts it to For this use case, the problem is the default entry point script does not change the owner of the workspace directory because it already exists. Thats because docker automatically created the workspace directory to mount the volume while setting up the container. |
I think I am hitting the same issue using the simple
Same thing when not bind-mounting:
I reproduce this issue starting release 6.17.0. Successful output with 6.16.0:
|
+1 It seems to me that the approach of using a volume as described in the documentation no longer works since version 6.17 where the entrypoint script was changed to allow running as different users. |
Describe the bug
docker-compose files that mount a workspace volume to /workspace will create that directory when the service container is created. That directory will always have owner root. The entrypoint.sh script will see that the /workspace directory exists and not run
chown codechecker
on it. However,CodeChecker server
when run as user codechecker needs to be the owner of /workspace to write to it.CodeChecker version
v6.17.0
To Reproduce
Run
docker-compose up
on any of the sample files. You may need to change the image tocodechecker/codechecker-web:v6.17.0
Expected behaviour
codechecker service should initialize correctly.
Desktop (please complete the following information)
Additional context
None.
The text was updated successfully, but these errors were encountered: