1. Get the Docker Toolbox from https://www.docker.com/docker-toolbox and install it.
docker-machine create --driver virtualbox seleniumbase
(If your Docker environment ever goes down for any reason, you can bring it back up with a restart.)
docker-machine restart seleniumbase
eval "$(docker-machine env seleniumbase)"
docker build -t seleniumbase .
6. Run a test inside your Docker: (Once the test completes after a few seconds, you'll automatically exit the Docker shell)
docker run seleniumbase ./run_docker_test_in_firefox.sh
docker run seleniumbase ./run_docker_test_in_chrome.sh
docker run -i -t seleniumbase
./run_docker_test_in_chrome.sh
exit
11. (Optional) Since Docker images and containers take up a lot of space, you may want to clean up your machine from time to time when they’re not being used:
http://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers Here are a few of those cleanup commands:
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi
docker rm 'docker ps --no-trunc -aq'
If you want to completely remove all of your Docker containers and images, use these commands: (If there's nothing to delete, those commands will return an error.)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
Finally, if you want to wipe out your SeleniumBase Docker virtualbox, use these commands:
docker-machine kill seleniumbase
docker-machine rm seleniumbase