Requirement Docker版本需要20.10及以上 1 yum install -y docker-ce SonarQube Install docker-compose.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 sonarqube:image:sonarqube:communitycontainer_name:sonarenvironment:SONAR_JDBC_URL:jdbc:postgresql://128.0.100.170:5432/sonarSONAR_JDBC_USERNAME:sonarSONAR_JDBC_PASSWORD:sonarvolumes:- ./sonarqube_data:/opt/sonarqube/data- ./sonarqube_extensions:/opt/sonarqube/extensions- ./sonarqube_logs:/opt/sonarqube/logsports:- "9000:9000"db:image:postgres:12container_name:sonar-dbnet:hostenvironment:POSTGRES_USER:sonarPOSTGRES_PASSWORD:sonarvolumes:- ./sql_config:/var/lib/postgresql- ./sql_data:/var/lib/postgresql/data 访问9000端口即为Son