ciricihq / gitlab-sonar-scanner

This project is no longer maintained
GNU General Public License v3.0
80 stars 62 forks source link

Define a default command or entrypoint for the Image #37

Open hansingt opened 5 years ago

hansingt commented 5 years ago

There is no default command and no entrypoint defined in the Dockerfile. Thus, everybody not using the .gitlab-ci.yml using this image needs to explicitly call it with:

docker run ciricihq/gitlab-sonar-scanner gitlab-sonar-scanner

As the gitlab-sonar-scanner script is the main purpose of this image. We could define it as the default command or maybe even as the default entrypoint.

elboletaire commented 5 years ago

Do you use it outside of gitlab? Because we don't, and that's why we didn't even think about making it available for other purposes. Although, if you think it's useful, we're open to PR.

hansingt commented 5 years ago

I do not use it outside of GitLab-CI. But I can imagine usecases in which one might need to explicitly call it.

I did a PR (#34) which included a fix for this issue as well as for !36. But it has been closed in favour of another PR, which in fact beaks things (as mentioned at #38)

elboletaire commented 5 years ago

34 was not accepted because there were changes not related to the binary upgrade. Also, the upgrade error is due to the sonarqube scanner binary itself, so the problem would be the same in all the other PR.

hansingt commented 5 years ago

I understand why the PR was closed. Just wanted to mention this.

Offtopic, but just my two cents: I think, that the problems with #38 exist, because you are using the "-linux-zip" which includes a pre-compiled JRE which is used by default. This JRE is compiled for GLIBC. But you are using Alpine, which uses MUSL. Because of this, this does not work.

Acutally, this brings me to another issue with the other PR: We don't need this additional JRE. Just use the plain distribution Mentioned as "any" here https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner