Skip to content

Instantly share code, notes, and snippets.

@grizmio
Last active January 19, 2023 15:33
Show Gist options
  • Save grizmio/3f78a31541a9afda1b8780bc1fb14452 to your computer and use it in GitHub Desktop.
Save grizmio/3f78a31541a9afda1b8780bc1fb14452 to your computer and use it in GitHub Desktop.
SonarQube 8.9.6
First, the server
docker run -d --name sonarqube -p 8000:8000 -p 9000:9000 sonarqube:8.9.6-community
Then login with admin:admin
http://127.0.0.1:9000
Create the project and its token
An example for running the scanner with docker
docker run \
--rm \
-e SONAR_HOST_URL="http://host.docker.internal:9000" \
-e SONAR_SCANNER_OPTS="-Dsonar.projectKey=wonderproject -Dsonar.sourceEncoding=UTF-8 -Dsonar.javascript.lcov.reportPaths=\"./coverage/lcov.info\"" \
-e SONAR_LOGIN="99f7b59e905f46b52746ebc88a527101fde0871e" \
-v "${PWD}:/usr/src" \
-extra_hosts="host.docker.internal:host-gateway" \
sonarsource/sonar-scanner-cli:4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment