Is there a way to install just the sonar-scanner in my own Docker image?

I have a Docker Image uses Rails and utilizes Rake to test files and output some coverage files. My issue I am running in to is the tests are run via docker so the coverage output from SimpleCov (reporting coverage tool for ruby) as relative to the docker app root (var/app for example).

Now I can run the sonar-scanner locally but it does not upload coverage because it cant locate these coverage paths based from var/app, instead it wants to look for the absolute path of my system (this makes sense to me), so I am thinking that I need sonar-scanner on my docker instance in order to actually read these coverage lines and upload the report to SonarQube.

Is there a way to just install sonar-scanner to my own docker image? Ive scoured the internet and can not seem to find a direct path to do this.

Hello @Staghouse and welcome to the community :wave:

yeah it is basically downloading a zip file and extracting it. our Dockerfile is open source, so feel free to copy snippets from it :slight_smile: