Hi Community,
I am trying to start using sonarqube in my projects but I came from QA manual background and so far I am facing lack of technical skills in order to get the docker image running with all plugins I need from the docker hub.
What I am trying to do is to use the latest image released from the docker hub with the sonarqube:latest and install a plugin to evaluate a clojure application. By now all I could do was to use docker compose to run sonaqube with the version I defined, but I can’t use the postgres or install the plugin I desire. What I have so far is this:
Dockerfile
FROM sonarqube:latest
COPY /extensions/sonar-clojure-plugin-2.0.0.jar /opt/sonarqube/extensions/plugins/
COPY /config/sonar.properties /opt/sonarqube/conf/
docker-compose.yml
version: "3.8"
services:
sonarqube:
build: .
container_name: sonarqube6
ports:
- "9000:9000"
- "9002:9002"
environment:
- TZ=America/Sao_Paulo
networks:
- sonarnet
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
db:
image: postgres:latest
container_name: postgres_sonarqube6
networks:
- sonarnet
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
networks:
sonarnet:
driver: bridge
ipam:
config:
- subnet: 172.16.57.0/25
volumes:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled-plugins:
postgresql:
postgresql_data:
sonar.properties
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonar
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
Am I in the right path or what I am trying to do is sth out of this world?