{"id":16541081,"url":"https://github.com/spujadas/sonar-runner-docker","last_synced_at":"2025-07-03T02:05:29.478Z","repository":{"id":69954491,"uuid":"39212330","full_name":"spujadas/sonar-runner-docker","owner":"spujadas","description":"Docker image for SonarQube Runner, the recommended default launcher to analyse a project with SonarQube","archived":false,"fork":false,"pushed_at":"2015-07-30T09:12:59.000Z","size":124,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T18:15:05.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spujadas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-16T18:01:14.000Z","updated_at":"2025-02-06T04:16:23.000Z","dependencies_parsed_at":"2023-02-28T17:48:00.682Z","dependency_job_id":null,"html_url":"https://github.com/spujadas/sonar-runner-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spujadas/sonar-runner-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fsonar-runner-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fsonar-runner-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fsonar-runner-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fsonar-runner-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spujadas","download_url":"https://codeload.github.com/spujadas/sonar-runner-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fsonar-runner-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263245292,"owners_count":23436511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T18:54:02.027Z","updated_at":"2025-07-03T02:05:29.423Z","avatar_url":"https://github.com/spujadas.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker image for SonarQube Runner\n\n[SonarQube Runner](https://github.com/Sonarsource/sonar-runner) is recommended as the default launcher to analyse a project with [SonarQube](http://www.sonarqube.org/).\n\n### Contents\n\n - Usage\n\t - Option 1 – Run SonarQube Runner against dockerised SonarQube\n\t - Option 2 – Run SonarQube Runner against regular SonarQube\n - Build\n\t - Build with Docker\n\t - Build with Docker Compose\n - About\n\n## Usage\n\nCreate a `sonar-project.properties` file in the directory containing the project to be analysed, as described on the [Analyzing with SonarQube Runner](http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Runner) page of SonarQube's documentation site.\n\nHere's an sample file for a project named *My project*, with code to be analysed in the `app` subdirectory of the project:\n\t\n\tsonar.projectKey=my:project\n\tsonar.projectName=My project\n\tsonar.projectVersion=1.0\n\tsonar.sources=app\n\tsonar.sourceEncoding=UTF-8\n\nThen `cd` to the project's directory and run SonarQube Runner using one of the two options presented below.\n\n### Option 1 – Run SonarQube Runner against dockerised SonarQube\n\n**Prerequisite** – Start a SonarQube container (e.g. `sonarqube`) with ports 9000 and 9092 exposed, and get its name (e.g. `sonarqubedocker_sonarqube_1` in the example below).\n\nIn the command below, adapt:\n\n- the `--link` option to use the actual name of the SonarQube container,    \n\n- the `-Dsonar.* options` as needed.\n\nHere it goes...\n\n\tdocker run --link sonarqubedocker_sonarqube_1:sonarqube \\\n\t  --entrypoint /opt/sonar-runner-2.4/bin/sonar-runner \\\n\t  -e SONAR_USER_HOME=/data/.sonar-cache \\\n\t  -v $(pwd):/data -u $(id -u) sebp/sonar-runner \\\n\t    -Dsonar.host.url=http://sonarqube:9000 \\\n\t    -Dsonar.jdbc.url=jdbc:h2:tcp://sonarqube/sonar \\\n\t    -Dsonar.jdbc.username=sonar \\\n\t    -Dsonar.jdbc.password=sonar \\\n\t    -Dsonar.jdbc.driverClassName=org.h2.Driver \\\n\t    -Dsonar.embeddedDatabase.port=9092\n\n### Option 2 – Run SonarQube Runner against regular SonarQube\n\nRun the command below, adapting the `-Dsonar.* options` as needed, especially the `-Dsonar.host.url` and `-Dsonar.jdbc.url` options, where the example value `sonarqube` has to be replaced with the hostname of your SonarQube server.   \n\n\tdocker run --entrypoint /opt/sonar-runner-2.4/bin/sonar-runner \\\n\t  -e SONAR_USER_HOME=/data/.sonar-cache \\\n\t  -v $(pwd):/data -u $(id -u) sebp/sonar-runner \\\n\t    -Dsonar.host.url=http://sonarqube:9000 \\\n\t    -Dsonar.jdbc.url=jdbc:h2:tcp://sonarqube/sonar \\\n\t    -Dsonar.jdbc.username=sonar \\\n\t    -Dsonar.jdbc.password=sonar \\\n\t    -Dsonar.jdbc.driverClassName=org.h2.Driver \\\n\t    -Dsonar.embeddedDatabase.port=9092\n\n## Build\n\nFirst clone or download the [spujadas/sonar-runner-docker](https://github.com/spujadas/sonar-runner-docker) GitHub repository, open a shell in the newly created `sonar-runner-docker` directory, then build the image and run a container using Docker or Docker Compose, as explained below.\n\n### Build with Docker\n\nThis command will build the image:\n\n\t$ sudo docker build .\n\n### Build with Docker Compose\n\nBuild the image with this command:\n\n\t$ sudo docker-compose build\n\n\n## About\n\nWritten by [Sébastien Pujadas](http://pujadas.net), released under the [under the GNU Lesser GPL License, Version 3](http://www.gnu.org/licenses/lgpl.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspujadas%2Fsonar-runner-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspujadas%2Fsonar-runner-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspujadas%2Fsonar-runner-docker/lists"}