创建数据库和sonar用户
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON sonar.* TO 'sonar'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
docker安装sonarqube server
docker run -d --name sonarqube \
-p 9000:9000 -p 9092:9092 \
-e "SONARQUBE_JDBC_USERNAME=sonar" \
-e "SONARQUBE_JDBC_PASSWORD=sonar" \
-e "SONARQUBE_JDBC_URL=jdbc:mysql://172.17.0.2:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false" \
sonarqube:7.1
网友评论