Created
September 23, 2016 14:25
-
-
Save dersam/70de2d7e505fa9bb32378f953d295ada to your computer and use it in GitHub Desktop.
Start a docker machine for running tests via Webdriver with the elgalu/selenium container
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
#!/usr/bin/env bash | |
docker-machine start default | |
docker rm -f grid | |
docker run --rm --name=grid --add-host='develop.vagrant.dev:192.168.80.80' -p 4444:24444 -p 5920:25900 \ | |
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.51.0b > /dev/null & | |
sleep 5 | |
docker exec grid wait_all_done 30s | |
eval $(docker-machine env default) | |
echo "Machine IP: " | |
docker-machine ip default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may want to change the version
2.51.0b
tolatest
;)If you want to run it in the background with
&
you can get rid of that by changing--rm
with-d
i.e. daemon mode.You can wait just 1 or 2 seconds instead of 5 as the
wait_all_done
will wait only what's necessary.