Docker-Nightmare headless node image A node:latest compiled with nightmare support running in xvfb. Usage: In your project, use this image: FROM quay.io/ivanvanderbyl/docker-nightmare:latest ADD . /workspace RUN yarn install # if you have package.json and/or yarn.lock CMD "index.js" Then build the image: docker build -t myscraper . Run your nightmare script (assuming it was called index.js): docker run myscraper:latest --rm index.js See a working example for DuckDuckGo Technical details Node is latest from docker hub, so probably 7.2+ at time of writing Your script is executed with Xvfb running in the background on display :99.0 at 1280x2000x24 node is executed with --harmony-async-await flag. Most of this is based on help from segmentio/nightmare#224
ettysekhon/docker-nightmare
Docker-Nightmare headless node image
A
node:latest
compiled withnightmare
support running inxvfb
.Usage:
In your project, use this image:
Then build the image:
docker build -t myscraper .
Run your nightmare script (assuming it was called
index.js
):See a working example for DuckDuckGo
Technical details
:99.0
at1280x2000x24
node
is executed with--harmony-async-await
flag.