rBrachet
(rBrachet)
September 25, 2020, 8:23am
1
Hi,!
I just install the docker version 8.4.2-developer and I will analysis a C/C++ project. When I go to the quality profiles I have any profiles !
I start my docker with this command :
docker run -d --name sonarqube -p 7000:9000 -v $SONARQUBE_HOME/conf:/opt/sonarqube/conf -v $SONARQUBE_HOME/extensions:/opt/sonarqube/extensions -v $SONARQUBE_HOME/logs:/opt/sonarqube/logs -v $SONARQUBE_HOME/data:/opt/sonarqube/data sonarqube:8.4.2-developer
I use port 7000, the 9000 being already used by another docker.
$SONARQUBE_HOME : my home variable of sonarqube on my computer for docker volumes
If you have any idea
Thank you
Romain
Hi @rBrachet and welcome to the community
the reason for this behavior is the usage of filesystem mounts in your docker command. as documented here , you should create named volumes in order to have them populated correctly.
Take this docker-compose.yml as an example on how to get started
version: "3"
services:
sonarqube:
image: sonarqube:8.4.2-developer
depends_on:
- db
environment:
SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
SONAR_JDBC_USERNAME: sonar
SONAR_JDBC_PASSWORD: sonar
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_temp:/opt/sonarqube/temp
ports:
- "7000:9000"
db:
image: postgres:12
environment:
POSTGRES_USER: sonar
POSTGRES_PASSWORD: sonar
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
volumes:
sonarqube_data:
sonarqube_extensions:
sonarqube_logs:
sonarqube_temp:
postgresql:
postgresql_data:
hope that helps