Sonar LDAP Configuration via Docker Environment Variables

Running sonarqube 7.6 in docker. I’ve been able to configure LDAP successfully via editing the configuration file in the docker container.

Now I’m trying to setup everything to run from the docker command line as environment variables, i.e.,
docker run -d --name sonarqube -p 9000:9000 -e -e ldap.url=ldap://someserver.local -e … so on and so on.

I see the message.

Security realm: LDAP
The property ‘ldap.url’ is empty and no realm configured…

Is this possible does anyone have any examples of configuring docker sonarqube LDAP using environment variables.

This will work with new images (>= 7.7) but won’t work with 7.6 image. Unfortunately for older images only properties starting with “sonar.” are propagated to the server.