1、安装
sonar7.8以后不再支持mysql
- 环境准备
由于SonarQube使用嵌入式Elasticsearch,因此请确保您的Docker主机配置符合Elasticsearch生产模式,以root用户身份运行以下命令来设置当前会话的建议值:
# 修改系统最大连接数
sysctl -w vm.max_map_count=262144
# 修改系统所有进程一共可以打开的文件数量
sysctl -w fs.file-max=65536
# 设置能打开的最大文件描述符数
ulimit -n 65536
# 设置限制最大用户进程数
ulimit -u 4096
- docker-compose.yml文件
version: '3.7'
services:
postgres:
restart: always
image: postgres
container_name: postgres
ports:
- 5432:5432