Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Latest commit

 

History

History
127 lines (105 loc) · 4.59 KB

README_DOCKERHUB.md

File metadata and controls

127 lines (105 loc) · 4.59 KB

Docker images with out-of-the-box SonarQube 9.4.0, SonarQube 8.9 LTS, SonarQube 7.9 LTS and SonarQube 6.7 LTS instance with support for Scala, Scoverage (code coverage metrics) and Scalastyle + Scapegoat (static code analysis).

Available versions

There are two types of images available: images with sonar-scala plugin, which can be mounted as a volume into a SonarQube container and images which bundle sonar-scala plugin with SonarQube server (suffixed with -full).

Starting from version 2.7.0, the images no longer contain the sonar-scala-extra plugin as sonar-scala provides Scapegoat support from version 6.5.0 onwards.

For older versions please check the releases page on Github.

What's included

Version SonarQube sonar-scala
6.0.0 9.0.0
6.0.0-full 9.4.0 9.0.0
5.8.0 8.9.0
5.8.0-full 8.9.4 LTS 8.9.0
4.2.0 7.9.0
4.2.0-full 7.9.1 LTS 7.9.0
2.12.0 6.8.0
2.12.0-full 6.7.7 LTS 6.8.0

Usage

To use one of the volume images, mount it as a volume to your existing SonarQube container using e.g. docker-compose:

version: "2"

services:
  sonarqube:
    image: sonarqube:9.4.0-community
    ports:
      - "80:9000"
    networks:
      - sonarnet
    volumes_from:
      - plugins

  plugins:
    image: mwizner/sonarqube-scala-plugins:6.0.0
    volumes:
      - sonarqube_plugins:/opt/sonarqube/extensions/plugins
    command: /bin/true

networks:
  sonarnet:
    driver: bridge

volumes:
  sonarqube_plugins:

You can find the full recipe here and here (for the LTS version).

To use the full image, run the following docker command:

docker run -d \
  --name sonarqube-scala-plugins-full \
  -p 80:9000 \
  -e SONARQUBE_JDBC_USERNAME=sonar \
  -e SONARQUBE_JDBC_PASSWORD=sonar \
  -e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
  mwizner/sonarqube-scala-plugins:6.0.0-full

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, but if you don't have access to an existing database or you just want to try the image, you can use the following command:

docker run -d \
  --name sonarqube-scala-plugins-full \
  -p 80:9000 \
  mwizner/sonarqube-scala-plugins:6.0.0-full

Repository

This project is open-sourced and can be found on Github.

sonar-scala documentation can be found on sonar-scala.com.