Sign inSign up

mwizner/sonarqube-scala-plugins

By mwizner

•Updated over 4 years ago

SonarQube Docker images with plugins for static code analysis of Scala projects.

Image
1

10K+

mwizner/sonarqube-scala-plugins repository overview

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

VersionSonarQubesonar-scala
6.0.09.0.0
6.0.0-full9.4.09.0.0
5.8.08.9.0
5.8.0-full8.9.4 LTS8.9.0
4.2.07.9.0
4.2.0-full7.9.1 LTS7.9.0
2.12.06.8.0
2.12.0-full6.7.7 LTS6.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⁠.

Tag summary

Content type

Image

Digest

Size

64.3 MB

Last updated

over 4 years ago

docker pull mwizner/sonarqube-scala-plugins