Define web context for SonarQube container in Docker

We have a SonarQube instance running as a docker service. Currently its url is “http://ip-address:9000”.
I would like to change that to “http://ip-address:9000/sonar”.

So I defined in sonar.properties:

sonar.web.context=/sonar

Then I restarted the docker service. The new url seems to work fine: I can log in and view everything. But when I try to update something, like a system setting, it returns to the login screen once I try to save the change.

Is it enough to just define sonar.web.context? Or do I also have to define sonar.web.host and sonar.web.port?

2 Likes

Hi Marjo,

That should be enough yes. I strongly suspect your problem to be related to a cache glitch (as you’ve been running similar instances under slightly different url). I suggest you fully clear your browser cache and try it once more.