Created
July 8, 2017 14:46
-
-
Save diemol/65602512c4930d991197dff8afbd1f85 to your computer and use it in GitHub Desktop.
Start Docker-Selenium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#docker stop $(docker ps -a --quiet) && docker rm $(docker ps -a --quiet) | |
for i in {0..10}; do | |
echo item: $i | |
hostIp=10.161.128.80 | |
echo hostIp: $hostIp | |
nodePort=$((40000 + i)) | |
echo nodePort: $nodePort | |
noVncPort=$((50000 + i)) | |
echo noVncPort: $noVncPort | |
vncPort=$((60000 + i)) | |
echo vncPort: $vncPort | |
docker run -d --name=zalenium_$nodePort -p $nodePort:$nodePort -p $noVncPort:$noVncPort \ | |
-e ZALENIUM=true -e SELENIUM_HUB_HOST=$hostIp \ | |
-e SELENIUM_HUB_PORT=4444 -e SELENIUM_NODE_HOST=$hostIp \ | |
-e GRID=false -e WAIT_TIMEOUT=120s -e PICK_ALL_RANDOM_PORTS=true \ | |
-e VIDEO_STOP_SLEEP_SECS=1 -e WAIT_TIME_OUT_VIDEO_STOP=20s \ | |
-e SEND_ANONYMOUS_USAGE_INFO=false \ | |
-e NOVNC=true -e NOVNC_PORT=$noVncPort -e VNC_PORT=$vncPort \ | |
-e SELENIUM_NODE_REGISTER_CYCLE=0 -e SEL_NODEPOLLING_MS=30000 \ | |
-e SELENIUM_NODE_PROXY_PARAMS=de.zalando.ep.zalenium.proxy.DockerSeleniumRemoteProxy \ | |
-e SELENIUM_NODE_CH_PORT=$nodePort -e CHROME=true -e FIREFOX=false \ | |
-v /dev/shm:/dev/shm --privileged elgalu/selenium | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment