Skip to content

Instantly share code, notes, and snippets.

@franckweb
Last active October 27, 2017 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save franckweb/ff76c4bf2d8c62c1509b0dd9b664654a to your computer and use it in GitHub Desktop.
Save franckweb/ff76c4bf2d8c62c1509b0dd9b664654a to your computer and use it in GitHub Desktop.
Selenium Grid in Docker compose file with WebDriver for Firefox and Chrome
version: '2'
services:
seleniumhub:
container_name: seleniumhub
image: selenium/hub
ports:
- "4444:4444"
firefoxnode:
container_name: firefoxnode
image: selenium/node-firefox-debug
ports:
- 4577
links:
- seleniumhub
environment:
- HUB_PORT_4444_TCP_ADDR=seleniumhub
- HUB_PORT_4444_TCP_PORT=4444
extra_hosts:
- "app.mywebapp.com:172.20.129.2"
volumes:
- /dev/shm:/dev/shm
chromenode:
container_name: chromenode
image: selenium/node-chrome-debug
ports:
- 4578
links:
- seleniumhub
environment:
- HUB_PORT_4444_TCP_ADDR=seleniumhub
- HUB_PORT_4444_TCP_PORT=4444
extra_hosts:
- "app.mywebapp.com:172.20.129.2"
volumes:
- /dev/shm:/dev/shm
networks:
default:
external:
name: build_static-network
# -hub URL http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment