SeleniumEnv
SeleniumEnv copied to clipboard
APP_HOST option is not working
Hi,
I am trying to set up the selenium docker image to run tests on a site located on the host machine (that is a build machine for my projects)
The issue is that when starting a new container with the command from the README.md file ( docker run -i -t -p 4444:4444 -e APP_HOST=myapp davert/selenium-env ) the "myapp" host is added on the guest machine into /etc/hosts at the end of the file as a new line, with no IP as prefix - so /etc/hosts will look like
root@83ad0b588321:/# cat /etc/hosts 172.17.0.1 83ad0b588321 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.17.42.1 dockerhost myapp
This will lead to mypp hosts not being accessible (and considering that I need to test several sites on the same build machine, using dockerhost is not an option).
This behavior was found on both Ubuntu 14 and CentOS 7.
This is due to an error in /start.sh It uses $HOSTIP instead of $HOST_IP. Easily fixed.