docker安装sonarqube7.4

编程

docker-compose --version

2、创建docker-compose.yml

version: "3"

services:

sonarqube:

image: sonarqube:7.4-community

ports:

- "9000:9000"

networks:

- sonarnet

environment:

- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar

volumes:

- sonarqube_conf:/opt/sonarqube/conf

- sonarqube_data:/opt/sonarqube/data

- sonarqube_extensions:/opt/sonarqube/extensions

- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins

db:

image: postgres:11.1

networks:

- sonarnet

environment:

- POSTGRES_USER=sonar

- POSTGRES_PASSWORD=sonar

volumes:

- postgresql_data:/var/lib/postgresql/data

networks:

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

回到顶部