Use tar with docker cp to fix various file permissions issues. #62
+20
−12
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.
Summary
Fixes various file permissions issues by using tar with docker cp to copy files as the sonar user.
Other Information
I believe this change is needed when using a custom workdir, but I also ran into permissions issues when using the default workdir. In my setup, the docker cp appears to overwrite file permissions with root, even though chown is run in the Dockerfile.
PR Checklist
Please run through before submitting for final review:
The PR title is descriptive of what changed.
The description sections above are filled out.
The CI pipeline is passing
The plugin version has been bumped (using SemVer)
The plugin version should be bumped both in
.env
and in the README. The plugin version is listed multiple times in the readme. Be sure to do a find/replace to ensure you haven't missed any!Added the
ready-for-review
label to the PR.