Step by step
docker pull elgalu/selenium
Run a new grid
docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \ --shm-size=1g -e VNC_PASSWORD=hola \ -e VIDEO=true elgalu/selenium
Wait for the grid to start
docker exec grid wait_all_done 30s
Check your grid has Chrome and Firefox.
boot2docker ip or
docker-machine ip default.
Run your tests
Stopping the grid will also stop video recording and close the file properly. However is better to stop the video service first then copy the videos to the host machine.
docker exec grid stop-video mkdir -p ./videos docker cp grid:/videos/. videos
docker exec grid stop docker stop grid
Check your video, note it may be splitted in many files if is too long
Start and stop on-demand
docker exec grid start-video
Now run your tests
Then stop. Follow the steps in the Stop section