Running SonarCube on your laptop using Docker

I recently wanted to do some source code analysis and found it difficult to find a good eclipse plugin. Luckily, it’s now very easy to get your own SonarCube server running. Basically you only need a docker installation and a few simple steps.

To start a SonarQube instance you run the following command:

Starting the SonarQube server will take several minutes. After it has started, you can generate a sonar report of your maven application with the followng command:

If all goes well, you’ve just created your first report and can access it on localhost on port 9000! Because the local SonarQube server stores every analysis in an internal H2 database you can even see what has changed since the last run. Have fun!

sonarcube-issues

It seems that this project needs some attention…

Please note that this setup is not recommended for production. If you want to know more, checkout the SonarQube docker page.

Leave a Reply

Your email address will not be published. Required fields are marked *