Published ports are discarded when using host network mode

*working on upgrade from v7.3 Community Edition to v8.9 Community Edition.
*using sonarqube docker container
*I put an application load balancer and autoscaling group (min 1/max 1), just in case the EC2 instance host has issues.
*Command I am running on [Linux]:

docker run -d --network host --rm
-p 9000:9000
–ulimit nofile=65536:65536
-v sonarqube_conf:/opt/sonarqube/conf
-v sonarqube_extensions:/opt/sonarqube/extensions
-v sonarqube_logs:/opt/sonarqube/logs
-v sonarqube_data:/opt/sonarqube/data
sonarqube:7.4-community

WARNING: Published ports are discarded when using host network mode

I was successful migrating to v7.4 SQ Docker Container, then to v7.9 SQ Docker Container and finally to v8.9 SQ Docker Container several times, but my last test run before the actual upgrade, I started getting the WARNING message in the Topic header.

Unfortunately there is nothing in the logs at /var/lib/docker/volumes/sonarqube_logs/_data

Any ideas?

Update: I also noticed the sonarqube_logs files are owned by libstoragemgmt:input

Hi @dprob,

First, a note of caution on using these old containers: SonarSource didn’t offer our own Docker containers until the 7.9 release. I can’t say whether using anything older than this is likely to meet with success nor that the containers are even configured in the same way as our official ones; the older ones appears to have been composed by 3rd party developers. There’s also no reason I can see for you to attempt to operate 7.4 if you’re starting from 7.3: you can take your 7.3 database and start with the 7.9 migration as made clear in our upgrade docs.

Your specific error has nothing in particular to do with upgrading, though. Using host-mode networking and publishing a port sort of contradict each other, as made clear in Docker’s documentation.

Thanks Jeff. I didn’t realize 7.9 was 1st docker from SQ. I should have caught that earlier when looking at Docker Hub and reading some of the documentation that is way out of date compared to SQ’s docs. :slight_smile: