Skip to content

Instantly share code, notes, and snippets.

@jeato

jeato/Dockerfile Secret

Created February 23, 2015 22:36
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jeato/446240f00462956f81ec to your computer and use it in GitHub Desktop.
Save jeato/446240f00462956f81ec to your computer and use it in GitHub Desktop.
selenium_grid/node
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"]
#!/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