This is a write up on how to get a SonarQube up and running in docker so that the sconar scanner can be run against project source code for source code analysis.
first run docker run -d --name sonarqube -p 9000:9000 sonarqube to start the sonarqube container this only needs to be run once because then the container will continue to be there the next time you want the container it just needs to be started
Then to run the scan start
docker run --network=host --rm -e SONAR_HOST_URL="http://localhost:9000" -v "C:\Users\hollmanc\Desktop\ava\ava:/usr/src" sonarsource/sonar-scanner-cli -Dsonar.projectKey="ava"
This container is ephemeral so it needs to be run each time the repo needs to be scanned.