File permission issue
If I understand correctly, user inside Maven container is root
. As /srv/project-sources
on host is mounted as /srv/project-sources
for the Docker container, it means that when the container is writing a new file in /srv/project-sources
it will actually create a file own by root
on the host.
This can lead to an issue if a job executed by scancode runner (shell runner) need to have access to the file because it is run using the gitlab-runner
user.
@mh I'm not really sure how to address that. I reporting this because, I faced this issue because scancode is running on a project previously build and failed to read some files created by the build process.
I guess a solution would be to:
- Clean build file in a final stage
- Configure scancode to ignore all the files produced by the build