In my company we are shifting from our local build machines to Docker Swarm. As such I am re-creating our build environment in a Dockerfile, where the image produced by it will be the Jenkins agent used for the job run.
As part of this I am also trying to install sonar-scanner. The relevant part is this:
Sonar-scanner uses embedded jre. You will see that in the bin/sonar-scanner. SONAR_RUNNER_HOME is not used in run script.
uncomment echo commands in the startup that will report current setup.
Try setting JAVA_HOME in environment explicitly.
@degree I am coming across this issue too. Has there been an official fix? Is this specific to the alpine container? I can see the java executable in the downloaded zip yet the scanner still throws the error java not found. The embedded java doesn’t seem to work properly
this is a rather old thread so i am not so sure about the origin. can you describe your observed behavior and the docker image that you are referring to?
There is now a official docker image using alpine that you could just use, or modify to your liking here