Closed acoard closed 6 years ago
This was completely my fault, I must have gotten the syntax wrong. Apologies! Here's the line that worked for me if anyone's curious.
docker run -ti -v $(pwd):/root/src --link sonarqube newtmitch/sonar-scanner sonar-scanner -Dsonar.projectName="example" -Dsonar.projectKey="example"
Thanks for closing the loop on this, Adam. It appears that the final command that worked for you can be derived from the README I have in place, although wasn't an explicit example that I gave, correct?
I see two possible issues with your original commands:
sonar-scanner
command as part of your docker run command itself. That command is what tells Docker what executable to run when the container starts. That said, it seems like the Dockerfiles highlight that command by default if you don't provide it. I'll do a quick test to make sure that's still valid...And you do have a couple of good points about the README consistency. I'll get that updated soon to make sure newtmitch/sonar-scanner
is changed to newtmitch/sonarscanner
where necessary.
Thanks!
The readme file has the following example text:
Note that the docker image it loads is
mitch/sonarscanner sonar-scanner
. Ever other example in the readme usesnewtmitch/sonar-scanner
. If you try to use the former text you get an error about docker unable to find the image. Presumably this is just out of date and needs updating?However, even when I update the text I'm still unable to get the configs to load properly.
Error message:
I thought it might be bash / argument parsing error, but the issue persists regardless if I break the config options into new lines or put them all on one line.
I'm relatively new to docker, so it's possible the error is my fault and unrelated to docker-sonar-scanner. I'm still working on it and will update when I have info.
P.S. - Thanks for working on this docker sonar scanner project, it's exactly what we needed and I really appreciate the time you've put into it. Thanks for keeping open source kickin'. :)
edit: So, upon closer reading of the readme it looks like i) updating the name of the image is addressed in the readme ii) but, the old image is still non-existant.
Lastly, when trying this command from the readme I continue to get the same error:
The presence of
-Dsonar.host.url=http://localhost:9000
is enough to cause the error.