Find open ports on host from inside a docker container with `docker.sock` mounted
问题 I am currently working on enabling review apps in gitlab. In order to do that I need to deploy an app for every merge request/ branch. Which means I need to find open ports where I can deploy to. Usually this issue would be solved by the answers to this question. But as the Gitlab Runner is itself a docker container with docker.sock mounted, I can not simply execute a script on the host to find empty ports. So I am looking for an elegant solution. I could of course always ssh into the host to