|
1 | 1 | Docker images with out-of-the-box [SonarQube LTS](https://www.sonarqube.org) instance with support for [Scala](http://www.scala-lang.org), [Scoverage](https://github.com/scoverage/scalac-scoverage-plugin) (code coverage metrics) and [Scalastyle](http://www.scalastyle.org) + [Scapegoat](https://github.com/sksamuel/scapegoat) (static code analysis). :sunglasses:
|
2 | 2 |
|
3 | 3 | ## Available versions
|
4 |
| -- `2.2.1`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.1.0/Dockerfile), [(v2.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.1) |
| 4 | + |
| 5 | +There are two types of images available: images with [sonar-scala](https://github.com/mwz/sonar-scala) and [sonar-scala-extra](https://github.com/arthepsy/sonar-scala-extra) plugins which can be mounted as a volume into a SonarQube container and images which bundle those plugins with SonarQube (suffixed with `-full`). |
| 6 | + |
| 7 | +- `2.3.0`, `latest` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.3.0/Dockerfile), [(v2.3.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.3.0) |
| 8 | +- `2.3.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.3.0-full/Dockerfile), [(v2.3.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.3.0) |
| 9 | +- `2.2.1`, [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.1/Dockerfile), [(v2.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.1) |
5 | 10 | - `2.2.1-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.1-full/Dockerfile), [(v2.2.1)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.1)
|
6 | 11 | - `2.2.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.0/Dockerfile), [(v2.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.0)
|
7 | 12 | - `2.2.0-full` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.2.0-full/Dockerfile), [(v2.2.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.2.0)
|
8 | 13 | - `2.1.0` [Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.1.0/Dockerfile), [(v2.1.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.1.0)
|
9 | 14 | - `2.1.0-full` ([Dockerfile](https://github.com/mwz/sonar-scala-docker/blob/master/2.1.0-full/Dockerfile)), [(v2.1.0)](https://github.com/mwz/sonar-scala-docker/releases/tag/2.1.0)
|
10 | 15 |
|
| 16 | +## What's included |
| 17 | +Version | SonarQube | sonar-scala | sonar-scala-extra |
| 18 | +--------|-----------|-------------|------------------ |
| 19 | +2.3.0 | | 6.2.0 | 1.3.0 |
| 20 | +2.3.0-full | 6.7.3 LTS | 6.2.0 | 1.3.0 |
| 21 | +2.2.1 | | 6.1.0 | 1.3.0 |
| 22 | +2.2.1-full | 6.7.3 LTS | 6.1.0 | 1.3.0 |
| 23 | +2.2.0 | | 6.1.0 | 1.3.0 |
| 24 | +2.2.0-full | 6.7.2 LTS | 6.1.0 | 1.3.0 |
| 25 | +2.1.0 | | 6.0.0 | 1.3.0 |
| 26 | +2.1.0-full | 6.7.1 LTS | 6.0.0 | 1.3.0 |
| 27 | + |
| 28 | + |
| 29 | +## Usage |
| 30 | +To use one of the volume images, mount it as a volume to your existing SonarQube container using e.g. `docker-compose`: |
| 31 | +``` |
| 32 | +version: "2" |
| 33 | +
|
| 34 | +services: |
| 35 | + sonarqube: |
| 36 | + image: sonarqube:6.7.3-alpine # lts |
| 37 | + ports: |
| 38 | + - "80:9000" |
| 39 | + networks: |
| 40 | + - sonarnet |
| 41 | + volumes: |
| 42 | + - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins |
| 43 | + volumes_from: |
| 44 | + - plugins |
| 45 | +
|
| 46 | + plugins: |
| 47 | + image: mwizner/sonarqube-scala-plugins:2.3.0 |
| 48 | + volumes: |
| 49 | + - sonarqube_plugins:/opt/sonarqube/extensions/plugins |
| 50 | + command: /bin/true |
| 51 | +
|
| 52 | + ... |
| 53 | +``` |
| 54 | + |
| 55 | +You can get the full recipe from [here](https://github.com/mwz/sonar-scala-docker/blob/master/docker-compose.yml). |
| 56 | + |
| 57 | +To use the `full` image, run the following `docker` command: |
| 58 | +```bash |
| 59 | +docker run -d --name sonarqube-scala-plugins-full \ |
| 60 | + -p 80:9000 \ |
| 61 | + -e SONARQUBE_JDBC_USERNAME=sonar \ |
| 62 | + -e SONARQUBE_JDBC_PASSWORD=sonar \ |
| 63 | + -e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \ |
| 64 | + mwizner/sonarqube-scala-plugins:2.3.0-full |
| 65 | +``` |
| 66 | +Please note that if you don't specify the `SONARQUBE_JDBC_URL` variable, SonarQube will use an embedded H2 database, which is not recommended in production. |
| 67 | + |
11 | 68 | ## Repository
|
12 | 69 | This project is open-sourced and can be found on [Github](https://github.com/mwz/sonar-scala-docker).
|
0 commit comments