Last active
November 6, 2021 18:59
-
-
Save dianjuar/5e53475e90da4b721df9871f8b14336f to your computer and use it in GitHub Desktop.
How to work with SonarQube in a dockerized way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download the image | |
docker pull sonarqube | |
docker pull sonarsource/sonar-scanner-cli | |
# Create the container | |
docker run --name=sonarqube -p 9000:9000 sonarqube | |
# Star the stoped container | |
docker start sonarqube --interactive | |
# Push content to the SonarQube Dockerized Server | |
# First create the user "local" with pasword "12345" | |
docker run \ | |
--rm \ | |
-e SONAR_HOST_URL="http://host.docker.internal:9000" \ | |
-v "`pwd`:/usr/src" \ | |
sonarsource/sonar-scanner-cli /bin/bash -c 'sonar-scanner \ | |
-Dsonar.host.url=$SONAR_HOST_URL \ | |
-Dsonar.login=local \ | |
-Dsonar.password=12345' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment