Skip to content

Instantly share code, notes, and snippets.

@dianjuar
Last active November 6, 2021 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dianjuar/5e53475e90da4b721df9871f8b14336f to your computer and use it in GitHub Desktop.
Save dianjuar/5e53475e90da4b721df9871f8b14336f to your computer and use it in GitHub Desktop.
How to work with SonarQube in a dockerized way
# 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