A ready-to-use Docker Compose configuration to run SonarQube locally for code quality analysis.
- SonarQube Community Edition (latest)
- PostgreSQL database (recommended for production-grade setup)
- Persistent data storage using Docker volumes
- Easy setup with single command
- Docker Engine 20.10+
- Docker Compose 2.0+
- 4GB+ RAM available (SonarQube requires at least 3GB)
- 2 CPU cores minimum
-
Clone this repository:
git clone https://github.com/LesterCerioli/sonarqube-docker.git cd sonarqube-docker -
Start the containers:
docker-compose up -d
-
Access SonarQube at:
http://localhost:9000 ```bash
Environment Variables Edit the .env file to customize:
SONARQUBE_VERSION=9.9.4-community
POSTGRES_VERSION=13
SONARQUBE_PORT=9000