Agnostic docker image to run sonar-scanner-cli-

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube 9.0.2 /sonar-scanner-cli-
  • what are you trying to achieve
    We currently have repos in the company that are developed in several languages like Python , go , typescript.
    we have build docker image per languages for running sonarqube-scanner but i guess this is hard to mantain updated since we have to keep updated each docker image changing language version.
    example a docker image for python that we have built is below , and the same for other two languages but changing the docker image for nodejs etc:
    touch Dockerfile

cat >>Dockerfile <<END_DOCKER
FROM python:3.7-buster
RUN python3.7 -m pip install --upgrade pip tox --no-cache-dir
RUN apt-get update && apt-get install shellcheck && apt-get clean
RUN curl >
&& unzip
&& rm
ENV SONARQUBE_HOME sonar-scanner-
RUN mkdir /home/build
WORKDIR /home/build

what I am would like to know if there is some docker image that is agnostic to the language , that allow us to have just one image that works for all repos.

  • what have you tried so far to achieve this

it was described above answer


Have you tried to use the offical docker image from Docker Hub?

You don’t need an image with Python to analyze Python code, or an image with Go to analyze Go code and the official image already contains a nodejs installation required for TypeScript analysis.

1 Like

thanks very much Felipe , i will test it and will let you now