-
-
Save jeato/446240f00462956f81ec to your computer and use it in GitHub Desktop.
selenium_grid/node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
ENV VERSION 2.44.0 | |
RUN apt-get update | |
RUN apt-get install -y software-properties-common | |
RUN add-apt-repository ppa:webupd8team/java | |
RUN apt-get update | |
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
RUN apt-get install oracle-java7-installer -y | |
RUN wget http://selenium-release.storage.googleapis.com/${VERSION%.*}/selenium-server-standalone-${VERSION}.jar | |
RUN apt-get install firefox xvfb -y | |
ADD register-node.sh /var/register-node.sh | |
RUN chmod 755 /var/register-node.sh | |
CMD ["/bin/bash", "/var/register-node.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
Xvfb :10 -screen 5 2000x2000x16 -ac & | |
export DISPLAY=:10.5 | |
export HOST_IP=$(ip addr show dev eth0 | grep "inet " | awk '{print $2}' | cut -d '/' -f 1) | |
[[ $HUB_1_PORT_4444_TCP_ADDR ]] || SELENIUM_1_PORT_4444_TCP_ADDR=$GRID_IP | |
java -jar selenium-server-standalone-${VERSION}.jar -role webdriver -host ${HOST_IP} -hub http://${HUB_1_PORT_4444_TCP_ADDR}:4444/grid/register -browser browserName=firefox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment