First install mysql database to build warehouse sonar

Docker pull sonarqube: 7.7 – community

Docker run -d –name sonarqube7.7 -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_USERNAME=root -e docker run -d –name sonarqube7.7 -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_PASSWORD = 123456 – e SONARQUBE_JDBC_URL = “JDBC: mysql: / / 192.168.1.205:33306 / sonar? useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false” Sonarqube: 7.7 – community

Download the corresponding Chinese package

Github.com/SonarQubeCo…

Docker cp/home/temp/sonar – l10n – useful plugin – 1.27. Jar container id: / opt/sonarqube/extensions/plugins/sonar – l10n – useful – the plugin – 1.27. The jar

The following information is added to the maven installation directory setting. XML


sonar



true

< sonar. JDBC url > JDBC: mysql: / / 192.168.1.205:33061 / sonar? useUnicode=true

com.mysql.jdbc.Driver


root


123456
< sonar. Host. Url > http://192.168.1.2:9000 < / sonar. Host. Url >

<activeProfiles>

<activeProfile>sonar</activeProfile>

</activeProfiles>


Under the project directory to type the command MVN clean install org. Sonarsource. Scanner. Maven: sonar maven – the plugin: 3.3.0.603: sonar

Go to the server and read the report