docker run \
-d \
—name sonarqube \
-p 9001:9000 \
-p 9092:9092 \
—link=postgres:postgres \
-v /root/dockervol/sonarqube/logs:/opt/sonarqube/logs \
-v /root/dockervol/sonarqube/conf:/opt/sonarqube/conf \
-v /root/dockervol/sonarqube/data:/opt/sonarqube/data \
-v /root/dockervol/sonarqube/extensions:/opt/sonarqube/extensions \
-e SONARQUBE_JDBC_USERNAME=root \
-e SONARQUBE_JDBC_PASSWORD=123456 \
-e SONARQUBE_JDBC_URL=”jdbc:postgresql://192.168.98.173:5432/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false” \
sonarqube:7.4-community
docker run —name postgres -e POSTGRES_USER=root -e POSTGRES_PASSWORD=123456 -d postgres
docker run —name sq —link db -e SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar -p 9000:9000 -d sonarqube