sonarqube的docker安装

3. Run the image with your database properties defined using the -e environment variable flag:

$> docker run -d --name sonarqube \
    -p 9000:9000 \
    -e SONAR_JDBC_URL=... \
    -e SONAR_JDBC_USERNAME=... \
    -e SONAR_JDBC_PASSWORD=... \
    -v sonarqube_data:/opt/sonarqube/data \
    -v sonarqube_extensions:/opt/sonarqube/extensions \
    -v sonarqube_logs:/opt/sonarqube/logs \
    

For docker-based setups, environment variables supersede all parameters that were provided with properties. See Docker environment variables for more details.

Use volumes

We recommend creating volumes for the following directories:

  • /opt/sonarqube/data: data files, such as the embedded H2 database and Elasticsearch indexes
  • /opt/sonarqube/logs: contains SonarQube logs about access, web process, CE process, Elasticsearch logs
  • /opt/sonarqube/extensions: for 3rd party plugins

Warning: You cannot use the same volumes on multiple instances of SonarQube.

你可能感兴趣的:(docker,jenkins,运维)