Install SonarQube using Docker

I have introduced you all Install SonarQube on Ubuntu. There is a much simpler way to do this than with the Docker. How is it in details? Let’s find out in this tutorial.

First, you guys open the Terminal on MacOS and Linux or Console on Windows, then use the “docker pull” command to download the SonarQube Image from the Docker Repository.

Here, we have two versions of SonarQube:

  • One is the LTS version (Long-term Support): this version is stable.
  • Second is the Latest version: contains the latest features of SonarQube.

To download the LTS version, use the following command:

For the latest version, use the following command:

In this tutorial, I will use the latest version.


Install SonarQube using Docker

Once you have downloaded SonarQube Image, you will now start a container from this image.

The command to start the container is as follows:

Here, I have mapped port 9000 of the container with port 9000 on my machine and run the container in detach mode so that the container is still running when we shut down the command line.

After running the above command, check all the containers in your machine, you will see the results as follows:

Install SonarQube using Docker

Now that you have access to http://localhost:9000/, you will see the following:

Install SonarQube using Docker

In the window above, please click the Login button to login to the administrator account of SonarQube with “admin” username and password is also “admin”.

Install SonarQube using Docker


Install SonarQube using Docker

One thing to keep in mind is that the version of SonarQube installed from the Docker Image uses the H2 Database. If you need to expand or upgrade to a new version of Sonar in the future, do not use this method.

You can read more about SonarQube in this book: SonarQube in Action

3 thoughts on “Install SonarQube using Docker

  1. Avatar

    Hi there, have you had issues starting sonarQube? Because I cannot start it. Here is my error message:
    2020.03.31 18:29:23 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [SQ starter] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.base@11.0.6/java.lang.ClassLoader.defineClass1(Native Method)

    java.base@11.0.6/ Source)
    2020.03.31 18:29:23 INFO app[][o.s.a.SchedulerImpl] Process[web] is stopped
    2020.03.31 18:29:23 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

Add Comment