#!/usr/bin/env bash

# Stop Running Containers
docker stop $(docker ps -a -q)

docker rm $(docker ps -a -q)

# Run with firefox debug. Taken from ./resources/docs/README.md
# Make sure to update the version of firefox-debug if needed
docker run -d --name firefox -p 5555:5555 \
-e REMOTE_HOST=http://$(echo `curl -s http://169.254.169.254/latest/meta-data/local-ipv4`):5555 \
-e HUB_PORT_4444_TCP_ADDR=grid.us-west2.justin.tv \
-e HUB_PORT_4444_TCP_PORT=80 \
selenium/node-firefox:2.53.0
