Build Phantomjs 2 with Docker.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Docker setup

See OS X instructions here

Don't forget to set Docker host variable.

export DOCKER_HOST=tcp://

I also had increase the memory and disk size of the image in the boot2docker config profile, see Boot2Docker CLI on how to update profile.

In the end I set memory=4096 and disk size=30000.


Build image

Make sure the build file is excutable, because I didn't which led to a permissions bonk.

chmod +x build

Then run:

docker build -t phantomjs2 .

Build phantomjs2 binary

docker run -e VERSION=2.0.0-dev phantomjs2

After it is done, which will be a long ass time, you can copy the binary back to host machine:

docker cp CONTAINER_ID:/home/phantomjs/bin/phantomjs-VERSION-lucid.tar.gz .

Build phantomjs2 binary w/export to s3

Don't have time to figure out the 'RequestTimeTooSkewed' error, so try at your own risk

docker run -e VERSION=2.0.0-dev -e AWS_ACCESS_KEY_ID=key -e AWS_SECRET_ACCESS_KEY=secret -e BUCKET=s3bucket phantomjs2

If you need to rummage around in docker container

docker run  -t -i phantomjs2 /bin/bash

Additional references: