Attempting to start sonarQube container from image yields various exceptions while following official SonarQube Documentation

SonarQube Version: Enterprise

Currently I have a Docker image of SonarQube is up and running, albeit with a few caveats. While attempting so set up the software via the official SonarQube documentation, the only way I am able to get it running currently is in an “attached” mode… For my purposes, this is not ideal.

Running the container yields “could not find java in ES_JAVA_HOME at /opt/java/openjdk/bin/java” message in terminal.

In order to circumnavigate this issue, the container has to be started in an attached mode, and the ES_JAVA_HOME variable has to be set manually, from inside the container via bash. Do you know of any arguments to be passed while starting the container that will allow the setting of ES_JAVA_HOME , without having to open execute bash commands from inside the container?

Secondly, attempting to run the container with the instructions supplied from the official SonarQube documentation Results in “/usr/bin/docker-current: Error response from daemon: No command specified. See ‘/usr/bin/docker-current run --help’”

In order to get SonarQube running, I had to follow the steps listed here. Although our SonarQube server is up and running, I am hesitant to assume that it is set up correctly, as I was unable to follow the official SonarQube documentation.

Any input you have on any of these issues is greatly appreciated.

Hello @croadcap and welcome to the community :wave:

you are probably facing a known bug that is tracked with SONAR-15167.

this can be mitigated by upgrading your container runtime to docker > 20.10 or change the default action in your seccomp-profile (line 2) to return SCMP_ACT_TRACE instead of SCMP_ACT_ERRNO.
you can also use this seccomp profile just for sonarqube if you adapt the run command like this:

docker run -d --name sonarqube --security-opt seccomp=/path/to/your/seccomp_profile.json  -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest

hope that helps :slight_smile: