turingears/sonar-scanner

By turingears

Updated 8 months ago

Imagen para utilizar sonar-cli

Image
Developer Tools

281

Example Build

docker build -t turingears/sonar-scanner:v6 . --build-arg TZ='America/Santiago' --build-arg URL_SONAR_CLI='https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.0.0.4432.zip'

Dockerfile

FROM alpine:latest

ARG TZ
ARG URL_SONAR_CLI

RUN apk update && apk add --no-cache curl sed unzip openjdk17-jre python3 nodejs bash jq
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
    curl --insecure -o ./sonarscanner.zip -L $URL_SONAR_CLI && \
    unzip sonarscanner.zip &> /dev/null && rm -rf sonarscanner.zip && \
    mv sonar-scanner-* /usr/lib/sonar-scanner && ln -s /usr/lib/sonar-scanner/bin/sonar-scanner /usr/local/bin/sonar-scanner && \
    sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /usr/lib/sonar-scanner/bin/sonar-scanner
ENV SONAR_RUNNER_HOME /usr/lib/sonar-scanner

Docker Pull Command

docker pull turingears/sonar-scanner