{"id":16769066,"url":"https://github.com/robincher/docker-compose-sonarqube","last_synced_at":"2025-04-10T19:32:13.341Z","repository":{"id":94131274,"uuid":"193889394","full_name":"robincher/docker-compose-sonarqube","owner":"robincher","description":"Docker compose quick start to install SonarQube , Postgresql and Nginx","archived":false,"fork":false,"pushed_at":"2019-06-28T04:27:20.000Z","size":14,"stargazers_count":12,"open_issues_count":1,"forks_count":11,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T17:11:07.118Z","etag":null,"topics":["docker","docker-compose","sonarqube"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robincher.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-26T11:14:27.000Z","updated_at":"2024-07-15T05:43:31.000Z","dependencies_parsed_at":"2023-03-11T13:15:50.370Z","dependency_job_id":null,"html_url":"https://github.com/robincher/docker-compose-sonarqube","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robincher%2Fdocker-compose-sonarqube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robincher%2Fdocker-compose-sonarqube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robincher%2Fdocker-compose-sonarqube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robincher%2Fdocker-compose-sonarqube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robincher","download_url":"https://codeload.github.com/robincher/docker-compose-sonarqube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281415,"owners_count":21077423,"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":["docker","docker-compose","sonarqube"],"created_at":"2024-10-13T06:13:15.627Z","updated_at":"2025-04-10T19:32:13.327Z","avatar_url":"https://github.com/robincher.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SonarQube Docker Compose\n\nThis is a quick set up to install SonarQube and its associated technology. The main bulk of the installation are based on Docker containers.\n\n## Technolog Stack\n\n1. SonarQube Community Edition 7.8\n2. Postgresql 10\n3. Nginx\n4. OpenJDK 8\n\n## Getting Started\n\nAssuming your systems are not connected the internet or required interaction with internal systems that are **secured by internal certificate authority**, you may need to build the respective docker images locally first on an internet machine.\n\n## Pre-requisite\n\nPlease ensure these tools are installed in your system.\n\n1. docker\n2. docker-compose\n\n### Build the Docker Image\n\n1. Build Postgresql Image\n\n```\ncd /build/postgresql\ndocker build --tag postgresql:10 --file Dockerfile .\n\n# Save the image as tar\ndocker save postgresql:10  \u003e postgresql-10.tar\n```\n\n2. Build SonarQube Image\n\nThe Dockerfile for SonarQube included stepps to load self-signed certificates into the container's java truststore. This is important if you required interaction to internal systems that enabled TLS with self-signed certificates. Copy the needed certificates based on your context.\n\n```\n# Example for copying a root ca to java trust store\n\nCOPY /certs/root.crt /tmp/\n\nRUN keytool -import -v -trustcacerts -alias sonarqube -file /tmp/root.crt \\\n    -keystore ${JAVA_HOME}/jre/lib/security/cacerts -noprompt -storepass changeit\n```\n\n```\ncd /build/sonarqube\ndocker build --tag sonarqube:hive --file Dockerfile .\n\n# Save the image as tar\ndocker save sonarqube:hive  \u003e sonarqube-hive.tar\n```\n\n### Copy The Docker Container Images\n\nCopy both the tar files into your machine or vm.\n\n### Running Docker Compose\n\nClone or copy this repository into the machine\n\n```\ncd docker-compose-sonarqube\n\ndocker-compose up -d\n```\n\nSonarQube should be up and running. Try to access it by going to http://localhost:9000\n\n## Editing the docker-compose file\n\n### Specifying your postgresql parameters\n\nEdit the env variables based on your own set-up. Note : This is not a secure or recommended way of managing secrets in containers, please do check out solutions like Hashicorp's Vault if you intend to run this in enterprise level.\n\n```\n   environment:\n      - POSTGRES_USER=xxxx\n      - POSTGRES_PASSWORD=xxxx\n      - POSTGRES_DB=xxx\n```\n\n## Editing SonarQube Configuration\n\nYou can also edit the configuration at conf/sonar.properties as it is mount directly to the container. The property file has been sanitized without actual secrets , ips or passwords.\n\nThe example configurations in sonar.properties to connect with AD through ldaps and outgoing proxy for updates through HTTP authentication. Please add in the details based on your own set-up\n\n##\n\n## License\n\n[Robin Cher - MIT LICENSE ](https://github.com/robincher/docker-compose-sonarqube/blob/master/LICENSE)\n\n## Useful Commands\n\nSome useful commands for testing the set-up\n\n### LDAP Binding Test\n\n```\nldapwhoami -vvvv -H ldaps://ldapserver  -D \"service_account@domain\" -W\n```\n\n## Reference\n\n1. Adding TrustStore - https://github.com/SonarSource/docker-sonarqube/issues/207\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobincher%2Fdocker-compose-sonarqube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobincher%2Fdocker-compose-sonarqube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobincher%2Fdocker-compose-sonarqube/lists"}