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) · 5.17 KB

README_DOCKERHUB.tpl.md

File metadata and controls

127 lines (105 loc) · 5.17 KB

Docker images with out-of-the-box SonarQube {{current.sonar}}, 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
{{current.version}} {{current.sonarScala}}
{{current.version}}-full {{current.sonar}} {{current.sonarScala}}
{{lts.version}} {{lts.sonarScala}}
{{lts.version}}-full {{lts.sonar}} {{lts.sonarScala}}
{{lts79.version}} {{lts79.sonarScala}}
{{lts79.version}}-full {{lts79.sonar}} {{lts79.sonarScala}}
{{lts67.version}} {{lts67.sonarScala}}
{{lts67.version}}-full {{lts67.sonar}} {{lts67.sonarScala}}

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:{{current.sonar}}-community
    ports:
      - "80:9000"
    networks:
      - sonarnet
    volumes_from:
      - plugins

  plugins:
    image: mwizner/sonarqube-scala-plugins:{{current.version}}
    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:{{current.version}}-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:{{current.version}}-full

Repository

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

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