Skip to content

Instantly share code, notes, and snippets.

@diemol
Created October 10, 2017 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diemol/d18330704f2ae2d81ac3e44a5f3773c0 to your computer and use it in GitHub Desktop.
Save diemol/d18330704f2ae2d81ac3e44a5f3773c0 to your computer and use it in GitHub Desktop.
A sample YAML file to spin up Selenium Grid via docker-compose
# docker-compose file
# To execute this docker-compose yml file use docker-compose -f <file_name> up
# Add the "-d" flag at the end for deattached execution
#selenium-hub: equivalent to manually running the command docker run -d -p 4444:4444 --name selenium-hub -P selenium/hub:3.6.0-bromine
selenium-hub:
restart: always
image: selenium/hub:3.6.0-bromine
ports:
- "4444:4444"
#selenium-chrome equivalent to manually running the command docker run -d --link selenium-hub:hub -P --name chrome selenium/node-chrome-debug:3.6.0-bromine
selenium-chrome:
restart: always
image: selenium/node-chrome-debug:3.6.0-bromine
ports:
- "5555:5900"
volumes:
- /dev/shm:/dev/shm
links:
- selenium-hub:hub
#selenium-firefox equivalent to manually running the command docker run -d --link selenium-hub:hub -P --name firefox selenium/node-firefox-debug:3.6.0-bromine
selenium-firefox:
restart: always
image: selenium/node-firefox-debug:3.6.0-bromine
ports:
- "5556:5900"
volumes:
- /dev/shm:/dev/shm
links:
- selenium-hub:hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment