Prepare the Docker installation
How to prepare the installation of SonarQube Server Developer or Enterprise edition from the Docker image.
Perform the pre-installation steps
See:
- Defining a JWT token (to keep user sessions alive during startup) 
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 indexes
- sonarqube_logs: contains SonarQube Server logs about access, web process, CE process, and Elasticsearch
- sonarqube_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_extensionsMake sure you’re using volumes as shown with the above commands, and not bind mounts. Using bind mounts prevents plugins from populating correctly.
Oracle database: add the JDBC driver
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:
- Start the SonarQube container with the embedded H2 database: 
docker run --rm \
    -p 9000:9000 \
    -v sonarqube_extensions:/opt/sonarqube/extensions \
    <image_name>For <image_name>, check the tags currently available on the DockerHub page. 
- Exit once SonarQube Server has started properly. 
- Copy the Oracle JDBC driver into - sonarqube_extensions/jdbc-driver/oracle.
Related pages
- Configuring network security features: 
Last updated
Was this helpful?

