A Dockerfile to build PhantomJS 2.0.0 for Linux from source.
There is an Automated Build on hub.docker.com, so getting the image is easy:
docker pull rosenhouse/phantomjs2:latest
docker run rosenhouse/phantomjs2 phantomjs -v
-
Install run-time dependencies
apt-get install -y libicu-dev libfontconfig1-dev libjpeg-dev libfreetype6
-
Extract binary
docker pull rosenhouse/phantomjs2:latest docker run -name temp rosenhouse/phantomjs2 docker cp temp:phantomjs/phantomjs-2.0.0/bin/phantomjs ~/phantomjs
-
Run
~/phantomjs -v 2.0.0