Home > Back-end >  How to install sonarqube developer edition via Docker?
How to install sonarqube developer edition via Docker?

Time:01-12

I’m trying to install Sonarqube Developer Edition server but after installation, in footer page, it shows that it’s the Community Edition that is installed. Here is my docker command:

docker run -d --name sonarqube --restart=always -p 9000:9000 -e sonar.jdbc.url=<my_jdbc_url> -e sonar.jdbc.username=<my_db_user> -e sonar.jdbc.password=<my_db_password> --network sonarqube_network --volume sonarqube:/opt/sonarqube sonarqube:9.7.1-developer

Thanks for you help !

CodePudding user response:

Can you try:

docker run -d -p 9000:9000 -p 9092:9092 sonarqube:developer

Navigate to http://localhost:9000

Or you may be able pass your variables directly in by running:

docker run -d -e SONAR_TOKEN=<YOUR_TOKEN> -e SONAR_EDITION=developer -p 9000:9000 -p 9092:9092 sonarqube:developer

CodePudding user response:

Maybe I missed something in my script, but otherwise I managed to solve my problem with docker compose

version: "3"

services:
  sonarqube:
    image: sonarqube:9.7.1-developer
    environment:
      SONAR_JDBC_URL: <my_jdbc_url>
      SONAR_JDBC_USERNAME: <my_db_username>
      SONAR_JDBC_PASSWORD: <my_db_password>
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
    ports:
      - "9000:9000"

volumes:
  sonarqube_data:
  sonarqube_extensions:
  sonarqube_logs:
  • Related