I have a pipeline that i would like to integrate SonarQube into so it can analyze my master branch. I created 2 containers on Docker, one with SonarQube running on it and one with a GitLab runner. After following the SonarQube instructions on their website (Link at the bottom of this post) i ran into some trouble. This is my job log:
The first error message says:
> ERROR: SonarQube server [[http://localhost:9000]](http://localhost:9000]/) can not be reached
Which is weird because when i open http://localhost:9000 in my browser it opens SonarQube.
This is my .gitlab-ci.yml which is the same as in the SonarQube Docs:
Has anyone ran into this problem before? Is it a SonarQube problem or maybe a Docker problem?
I think the problem is that my runner is trying to connect to the SonarQube container but it can’t make the connection.
I have spent multiple hours trying to find a solution and reading thru the documentation but none of them work for me, including: creating new runners, trying to expose ports in docker and making a network bridge between the 2 containers. Has anyone ran into this problem before?
- SonarQube Documentation: GitLab CI/CD | SonarQube Docs
- GitLab Documentation Run GitLab Runner in a container | GitLab, Registering runners | GitLab