elgalu / docker-selenium

[NOT MAINTAINED] Please use <https://github.com/SeleniumHQ/docker-selenium>
https://github.com/SeleniumHQ/docker-selenium
Other
1.42k stars 334 forks source link

Reverse tunnels with for accessing build-container in Gitlab-CI #386

Open nknapp opened 4 years ago

nknapp commented 4 years ago

I am currently looking for a way to execute visual regression tests with storybook, without having to use a service like Browserstack or SauceLabs. This docker-image seems to be exactly the thing that I am looking for, except for one little drawback:

When I run this image as "service" in Gitlab-CI, I cannot access the server on the build-container. The only feasible solution seems to be a reverse tunnel, similar to what Saucelabs does: If there was a running sshd in the image, the test-runner could do ssh -R 8080:127.0.0.1:8080 docker-selenium before starting the tests, and then tell the browser to load localhost:8080.

Setting up ssh in the docker-container, running as seluser was not so easy, so in my PoC, I used chisel to create the tunnel.

Would you be interested in adding this to the docker-image? Do you have another idea how to achieve my goal? Or should I rather continue extending my PoC to an image that can be used in production?

I'd rather have a way of doing this without building and maintaining my own image.