Docker-selenium: How to set up node maxSessions and maxInstances?

Created on 6 Mar 2018  路  2Comments  路  Source: SeleniumHQ/docker-selenium

I started docker by this way:
docker run -d --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-chrome:latest

How I can set the maxSessions and maxInstance?(I want to set up 10 instances(10 chrome) per container)

Most helpful comment

To start the node with a different maxSessions or maxInstances, you need only to specify the variables!

docker run -d -e NODE_MAX_SESSION=10 -e NODE_MAX_INSTANCES=10 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-chrome:latest

All 2 comments

Interesting this has come up now, just when I was discussing something related to this with @diemol.

He has recommended one slot per node, which has worked around an issue I was experiencing with the most recent versions. However, I would like to understand what the background behind the recommendation is, because it seems a little bit of an overkill perhaps.

To start the node with a different maxSessions or maxInstances, you need only to specify the variables!

docker run -d -e NODE_MAX_SESSION=10 -e NODE_MAX_INSTANCES=10 --link selenium-hub:hub -v /dev/shm:/dev/shm selenium/node-chrome:latest
Was this page helpful?
0 / 5 - 0 ratings