Installing SonarQube Server from the Docker image
Explains how to install SonarQube Server 10.7 from the Docker image.
SonarQube Server docker images support running both on the amd64 architecture and on arm64-based Apple Silicon.
We recommend using Docker Engine version 20.10 and above.
First, check the Server host and perform the On Linux systems. Then follow these steps for your first installation:
Create volumes to persist data
Creating the following volumes helps prevent the loss of information when updating to a new version or upgrading to a higher edition:
sonarqube_data: contains data files, such as Elasticsearch indexessonarqube_logs: contains SonarQube Server logs about access, web process, CE process, and Elasticsearchsonarqube_extensions: will contain any plugins you install and the Oracle JDBC driver if necessary.
Create the volumes with the following commands:
$> docker volume create --name sonarqube_data
$> docker volume create --name sonarqube_logs
$> docker volume create --name sonarqube_extensionsAdd the JDBC driver (if using an Oracle database)
Drivers for supported databases (except Oracle) are already provided. If you’re using an Oracle database, you need to add the JDBC driver to the sonar_extensions volume. To do this:
a. Start the SonarQube Server container with the embedded H2 database:
where <image_name> is:
for the SonarQube Community Build:
sonarqubefor the other editions: check the tags currently available on the DockerHub page.
b. Exit once SonarQube Server has started properly.
c. Copy the Oracle JDBC driver into sonarqube_extensions/jdbc-driver/oracle.
Start the SonarQube Server container
Start the SonarQube Server container:
either from the command line (docker run) or
from a configuration file (docker compose).
For docker-based setups, environment variables supersede all parameters that were provided with properties. See Environment variables for more details.
There is more information about installing and updating SonarQube Server plugins inside your Docker volume found on the Install a plugin page.
Starting the container by using docker run
Run the image with your database properties defined using the -e environment variable flag:
where <image_name> is:
for the SonarQube Community Build:
sonarqubefor the other editions: check the tags currently available on the DockerHub page.
Starting the container by using Docker compose
If you’re using Docker Compose, use this yml file example as a reference when configuring your .yml file. In the image tag, use the tag value corresponding to the SonarQube Server version you want to use, e.g, to use the LTA version of the Developer Edition:
Check the SonarQube Server image tags currently available on the DockerHub page.
Last updated
Was this helpful?

