The docs provide conflicting information for environment variables for 8.2 with Docker.
- The upgrade guide  examples have
SONAR_JDBC_... style variables.
- The install guide  examples have
SONAR_JDBC_ variables, but right below it warns that they will be deprecated.
- The 8.2 release upgrade notes  says that: “The old way of referencing environment variables in server configuration is deprecated and replaced with the support of default environment variables.” But no details are included about which have been deprecated.
- The environment variables doc  only documents
SONAR_JDBC_ style variables.
I’m pretty confused now. What are the right environment variables for 8.2?
 - https://docs.sonarqube.org/latest/setup/upgrading/
 - https://docs.sonarqube.org/latest/setup/install-server/
 - https://docs.sonarqube.org/latest/setup/upgrade-notes/#header-1
 - https://docs.sonarqube.org/latest/setup/environment-variables/
It is the SONARQUBE_JDBC, with the QUBE, environment variables that will be deprecated. You can use the SONAR_JDBC environment variables.
Hope this helps,
Hah, I haven’t even noticed that distinction!
What about the
sonar.jdbc... are properties that are defined in the file conf/sonar.properties and it’s another way to configure SonarQube. With Docker, we recommend using environment variables that can be defined using docker commands.
Were they also environment variables in the 8.1 beta docker release? I’m supplying them via environment variables to
8.1-enterprise-beta and everything seems to be working. The docs for 8.1 in docker at  just link to docker hub, so I think I got it from there. But the 8.1 info has since been removed from the docker hub page, so I can’t really confirm.
Sounds like I need to change to
SONAR_JDBC. Will that work with 8.1?
 - https://docs.sonarqube.org/8.1/setup/install-server/
Actually from looking at
run.sh in 8.2, it seems like
sonar. might be the new format:
Please use the environment variables described here: https://docs.sonarqube.org/latest/setup/environment-variables/ instead of
sonar.* format (the mechanism for this format is a legacy way of passing server properties to the container and will be removed in the future).
How can you add environment variables to running containers using docker commands?