HUB
Sign inSign up

travix/sonarqube

By travix

•Updated almost 10 years ago

A container to run SonarQube code quality analysis server

Image
0

943

travix/sonarqube repository overview

⁠travix/gocd-server

SonarQube⁠ code quality analysis

Stars Pulls License

⁠Usage

To run this docker container use the following command

docker run -d -p 9000:9000 travix/sonarqube:latest

⁠Environment variables

In order to configure the server with other than default settings you can pass in the following environment variables

NameDescriptionDefault value
SONARQUBE_JDBC_USERNAMEUsername for accessing the databasesonar
SONARQUBE_JDBC_PASSWORDPassword for accessing the databasesonar
SONARQUBE_JDBC_URLThe url to connect to the databasejdbc:h2:tcp://localhost:9092/sonar

Start the container by passing in environment variables in the following manner

docker run -d \
    -p 9000:9000 \
    -e "SONARQUBE_JDBC_USERNAME=sonar" \
    -e "SONARQUBE_JDBC_PASSWORD=sonar" \
    -e "SONARQUBE_JDBC_URL=jdbc:h2:tcp://localhost:9092/sonar" \
    travix/sonarqube:latest

⁠Mounting volumes

In order to keep important data persisted over a restart can mount the following directories

DirectoryDescriptionImportance
/opt/sonarqube/extensionsDownloaded and installed extensionsWithout saving this to a persistent disk the extensions are lost on every restart

Start the container like this to mount the volume

docker run -d \
    -p 9000:9000 \
    -e "SONARQUBE_JDBC_USERNAME=sonar" \
    -e "SONARQUBE_JDBC_PASSWORD=sonar" \
    -e "SONARQUBE_JDBC_URL=jdbc:h2:tcp://localhost:9092/sonar" \
    -v /mnt/persistent-disk/sonarqube/extensions:/opt/sonarqube/extensions \
    travix/sonarqube:latest
Tag summary
Recent tags
Content type
Image
Digest
Size
220.6 MB
Last updated
almost 10 years ago
docker pull travix/sonarqube:latest