Public | Automated Build

Last pushed: a year ago
Short Description
Fork of Accenture/adop-sonar with sonarqube upgraded to v5.5
Full Description

#Supported tags and respective Dockerfile links

Forked to upgrade SonarQube to 5.5

Upgrading SonarQube to version 5.5 from the LTS 4.5.7 currently used in adop-sonar.
Other slight modifications include:

  • removing the "sonar-scm-activity-plugin", which is no longer supported as of SonarQube v5
  • Adding OWASP sonar-dependency-check-plugin

What is adop-sonar?

adop-sonar is a wrapper for the sonarqube image. It has primarily been built to perform extended configuration.
SonarQube® software (previously called Sonar) is an open source quality management platform, dedicated to continuously analyze and measure technical quality, from project portfolio to method.

How to use this image

Run SonarQube

To start the server with the default H2 database run the following, where VERSION is the release version of the Docker container.

  docker run -d --name sonarqube -p 9000:9000 -e ADOP_LDAP_ENABLED=false adop/sonar:VERSION

Database configuration

By default, the image will use an embedded H2 database that is not suited for production.

The production database is configured with these variables: SONARQUBE_JDBC_USERNAME, SONARQUBE_JDBC_PASSWORD and SONARQUBE_JDBC_URL.

  docker run -d --name sonarqube \
      -p 9000:9000 -p 9092:9092 \
      -e SONARQUBE_JDBC_USERNAME=sonar \
      -e SONARQUBE_JDBC_PASSWORD=sonar \
      -e SONARQUBE_JDBC_URL="jdbc:mysql://sonar-mysql.service.adop.consul:3306/sonar?useUnicode=true&characterEncoding=utf8" \
      adop/sonar:VERSION

A standard MySQL database can be started with the following.

  docker run -td -p 3306:3306 -v /data/sonar:/var/lib/mysql  \
      -e MYSQL_USERNAME=sonar \
      -e MYSQL_PASSWORD=sonar \
      -e MYSQL_DATABASE=sonar \
      -e MYSQL_ROOT_PASSWORD=sonar mysql:5.7

MySQL/Docker/Documentation

LDAP Authentication

By default, the image will enable LDAP authentication, setting the ADOP_LDAP_ENABLED environment variable to false will disable LDAP authentication.

The image reads the following LDAP environment variables:

  • ldap.bindDn=${LDAP_BIND_DN} - the ldap root user bindn
  • ldap.bindPassword=${LDAP_BIND_PASSWORD} - LDAP user roo user password
  • ldap.user.baseDn=${LDAP_USER_BASE_DN} - user basedn
  • ldap.user.request=${LDAP_USER_REQUEST} - user query
  • ldap.user.realNameAttribute=${LDAP_USER_REAL_NAME_ATTRIBUTE} - user's real name attribute e.g. displayName
  • ldap.user.emailAttribute=${LDAP_USER_EMAIL_ATTRIBUTE} - user's email attribute, e.g. mail
  • ldap.group.baseDn=${LDAP_GROUP_BASE_DN} - group basedn
  • ldap.group.request=${LDAP_GROUP_REQUEST} - group query
  • ldap.group.idAttribute=${LDAP_GROUP_ID_ATTRIBUTE} - user group id attribute, e.g. cn

SonarQube/plugin/LDAP/Documentation

Other configuration variables

  • SONARQUBE_WEB_CONTEXT - sonar web context e.g. /sonar
  • SONARQUBE_SERVER_BASE - sonar base e.g. http//domain.com/sonar

License

Please view licence information for the software contained on this image.

Supported Docker versions

This image is officially supported on Docker version 1.9.1.
Support for older versions (down to 1.6) is provided on a best-effort basis.

User feedback

Upgrading from older versions of SonarQube (like the LTS 4.7) to SonarQube 5.3

Moving to a new version of SonarQube, usually means a DB upgrade as well.
Enforced authentication, which is turned on by default for this container, is currently breaking the db upgrade process from the web UI.

The solution we found so far is to temporarily disable the enforced authentication by running the container with the following environment variable set:
SONARQUBE_FORCE_AUTHENTICATION=false

After the initial DB upgrade, the authentication enforcement can be turned back on again by rerruning the container without the environment variable.

Documentation

Documentation for this image is available in the Sonar documentation page.
Additional documentaion can be found under the docker-library/docs GitHub repo. Be sure to familiarize yourself with the repository's README.md file before attempting a pull request.

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

Contribute

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Docker Pull Command
Owner
bahatelos
Source Repository

Comments (0)