SonarQube 6.5 on Alpine with LDAP integration
292

SonarQube is an open source platform for continuous inspection of code quality.
The container will start with the following plugins already installed
| Plugin | Version |
|---|---|
| Flex | 2.3 |
| LDAP | 2.2 |
| SonarC# | 5.10.1 |
| SonarJS | 3.1.1 |
| SonarJava | 4.12.0.11033 |
| SonarPHP | 1.8 |
| SonarPython | 1.8 |
| SCM / Git | 1.2 |
| SCM / SVN | 1.5 |
| SonarTS | 1.1 |
| SonarXML | 1.4.3 |
| Web | 2.5.0.476 |
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.
| Variable | Explanation | Example | Default |
|---|---|---|---|
JDBC_USERNAME | Username for the internal database connection | myuser | sonar |
JDBC_PASSWORD | Password for the internal database connection | mypassword | sonar |
SONARQUBE_JDBC_URL | The JDBC URL that was used to establish the current connection. | jdbc:postgresql://localhost/sonar | empty |
In order to connect to an LDAP server, you need to provide the following environment variables
| Variable | Explanation | Example | Default |
|---|---|---|---|
SONARQUBE_LDAP_ENABLE | If set to true the container will be configured to use LDAP authentication | false | |
SONARQUBE_BASE_DN | Base DN used for LDAP authentication | dc=mycorp,dc=com | empty |
SONARQUBE_REALM | LDAP domain REALM | mycorp.com | empty |
SONARQUBE_LDAP_URL | LDAP URL | http://mycorp.com:389 | ldap://localhost:389 |
SONARQUBE_LDAP_BINDDN | LDAP BindDn | [email protected] | administrator@SONARQUBE_REALM |
SONARQUBE_LDAP_PASSWORD | LDAP Password | MyBaseDNPassword | empty |
Please, note that if
SONARQUBE_LDAP_ENABLEis totrue,bothSONARQUBE_LDAP_PASSWORDandSONARQUBE_BASE_DNmust be initialized. In case they are not, the container will start without any LDAP configuration
$ docker run -d --name sonarqube \
-p 9000:9000 -p 9092:9092 \
-e SONARQUBE_JDBC_USERNAME=sonar \
-e SONARQUBE_JDBC_PASSWORD=sonar \
-e SONARQUBE_LDAP_ENABLE=true \
-e SONARQUBE_BASE_DN=dc=foo,dc=com \
-e SONARQUBE_REALM=foo.com \
-e SONARQUBE_LDAP_URL=ldap://fooserver:389 \
-e [email protected] \
-e SONARQUBE_LDAP_PASSWORD=P4ssW0rd1! \
militellovinx/sonarqube:latest
version: '3.3'
services:
sonar-service:
image: militellovinx/sonarqube:latest
restart: "unless-stopped"
ports:
- 9000:9000
environment:
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
- SONARQUBE_LDAP_ENABLE=true
- SONARQUBE_BASE_DN=dc=foo,dc=com
- SONARQUBE_REALM=foo.com
- SONARQUBE_LDAP_URL=ldap://fooserver:389
- [email protected]
- SONARQUBE_LDAP_PASSWORD=P4ssW0rd1!
Content type
Image
Digest
Size
216.3 MB
Last updated
almost 9 years ago
docker pull militellovinx/sonarqube