Skip to content

Instantly share code, notes, and snippets.

@shs96c
Created February 2, 2019 13:58
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 shs96c/fa6a8966d79ab73cbef2c8ecbbb25674 to your computer and use it in GitHub Desktop.
Save shs96c/fa6a8966d79ab73cbef2c8ecbbb25674 to your computer and use it in GitHub Desktop.
version: '3'
services:
sessions:
build:
context: .
dockerfile: Dockerfile
command: ["/selenium.jar", "sessions", "-p", "4001"]
ports:
- "4001:4001"
distributor:
build:
context: .
dockerfile: Dockerfile
command: ["/selenium.jar", "distributor", "-p", "4000"]
ports:
- "4000:4000"
- "4442:4442"
- "4443:4443"
depends_on:
- sessions
router:
build:
context: .
dockerfile: Dockerfile
command: ["/selenium.jar", "router", "-p", "4444", "-s", "http://sessions:4001", "-d", "http://distributor:4000"]
ports:
- "4444:4444"
depends_on:
- sessions
- distributor
@shs96c
Copy link
Author

shs96c commented Feb 2, 2019

To create:

./buckw build grid-tng
cp ./buck-out/gen/java/server/src/org/openqa/selenium/grid/selenium.jar selenium.jar
docker-compose build
docker-compose up

You can add a node using:

java -jar ./selenium.jar node -s http://localhost:4001 -d http://localhost:4000 --detect-drivers

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