docker安装sonarqube7.4
docker-compose --version
2、创建docker-compose.yml
version: "3"services:
sonarqube:
image: sonarqube:
7.4-communityports:
- "9000:9000"networks:
- sonarnetenvironment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonarvolumes:
- sonarqube_conf:/opt/sonarqube/conf- sonarqube_data:/opt/sonarqube/data- sonarqube_extensions:/opt/sonarqube/extensions- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-pluginsdb:
image: postgres:
11.1networks:
- sonarnetenvironment:
- POSTGRES_USER=sonar- POSTGRES_PASSWORD=sonarvolumes:
- postgresql_data:/var/lib/postgresql/datanetworks:
sonarnet:
driver: bridge
volumes:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled
-plugins:postgresql_data:
3、保存后在同目录下运行:
docker-compose up -d
4、查看运行状态:
docker-compose ps
或者直接访问:ip:9000
以上是 docker安装sonarqube7.4 的全部内容, 来源链接: utcz.com/z/517994.html