Skip to content

Instantly share code, notes, and snippets.

@jeato
Created March 17, 2015 20:45
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jeato/c006e1306e4ba8a01cd5 to your computer and use it in GitHub Desktop.
Save jeato/c006e1306e4ba8a01cd5 to your computer and use it in GitHub Desktop.
selenium/base Dockerfile
FROM ubuntu
ENV VERSION 2.44.0
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
RUN add-apt-repository -y ppa:webupd8team/java
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 update -qqy \
&& apt-get -qqy --no-install-recommends install \
oracle-java7-installer \
&& rm -rf /var/lib/apt/lists/*
RUN wget http://selenium-release.storage.googleapis.com/${VERSION%.*}/selenium-server-standalone-${VERSION}.jar
@rfranca86
Copy link

Hi,

I'm with a few doubts on your post http://www.conductor.com/nightlight/running-selenium-grid-using-docker-compose/

For example I've made a build on selenium base, and I will build the others images such as selenium-grid/firefox and selenium-grid/hub. How are you organizing thoses Dockerfiles ?

Example of directory scructure:

selenium_base(directory)
| - Dockerfile
| - selenium_hub(directory)
| - Dockerfile
| - selenium_firefox(directory)
| - Dockerfile

@wehappyfew
Copy link

Hello John,
at your post you use this ' -hub http://$HUB_1_PORT_4444_TCP_ADDR:4444/grid/register ' in register-node.sh .

Where do you declare it? Is it an environmental var ?

Best regards

@jeato
Copy link
Author

jeato commented Apr 5, 2016

Correct, I would use a directory structure where each Dockerfile lives in its own directory. They recommend this in Docker Best Practices.

@jeato
Copy link
Author

jeato commented Apr 5, 2016

Environmental vars like** $HUB_1_PORT_4444_TCP_ADDR** are set automatically by Fig (now called Docker-Compose). You can read more about which ones are available here. Things have changed a bit since I wrote this post, and it's no longer the recommended way to connect different Docker containers. Instead, I'd use Docker's link feature to link them in the docker-compose.yml file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment