Example repo for demonstrating how to run e2e tests with Docker and Nightmare.js
First you need to build the docker image
docker build -t docker-nightmare-example .
Then you run the test command in the container using xvfb
docker run -it docker-nightmare-example