Dockerized SonarQube Server for continuous code quality.
This project provides an image of SonarQube 6.2 with the following plugins:
- Sonar Python Plugin 1.7.0.1195
Additionally, this project also provides docker-compose.yml which can be used to easily provisioning an environment for SonarQube.
Before you start, you need to make sure you have the following dependencies installed:
Pull the image from the docker hub.
docker pull manat/sonarqube-python
Alternately you can build the image yourself.
git clone https://github.com/manat/docker-sonarqube.git
cd docker-sonarqube
docker build --tag="$USER/sonarqube" .
You may choose to leverage docker compose to help provisioning a complete environment for SonarQube.
git clone https://github.com/manat/docker-sonarqube.git
cd docker-sonarqube
cp .env.example .env
docker-compose up
.env
provides environment variables that can be used by docker-compose. This is to promote separation of config from the docker-compose file as it may varies across deployment. This project provides an example env file as .env.example
.
Point your browser to http://localhost:9000/ and login using the default username and password:
- username: admin
- password: admin
You should now have the SonarQube application up and ready for testing. If you want to use this image in production the please read on.
This compose file is defined to have 2 separate containers. First is the SonarQube container itself. Second is the PostgreSQL container. Docker Compose helps linking these 2 containers together.
The Postgresql database container is configured to persist data inside a Volume: /var/lib/postgresql/data
.
- http://www.sonarqube.org/
- http://docs.codehaus.org/display/SONAR/Browsing+SonarQube
- http://docs.codehaus.org/display/SONAR/Setup+and+Upgrade
manat/docker-sonarqube is available under the MIT license.