4

I am having a few issues with adding PhantomJS to our website docker containers.

I got 2 containers test and production but have no idea how to add it to each of these containers.

The containers are made with Dokku and are already running. This is a bit different so we are not able to pull up fresh containers with images or edit their Dockerfiles

Additionally we have managed to use commands like wget in them using dokku run, but this is not an interactive shell. Also the files downloaded with wget don't appear to be in the container when checking with ls even though the download finishes.

Craicerjack
  • 6,203
  • 2
  • 31
  • 39
Chou One
  • 627
  • 1
  • 13
  • 21
  • 1
    You should be able to just add [the binary](http://phantomjs.org/download.html) into the `PATH`, no? – Whymarrh May 29 '14 at 01:34

2 Answers2

3

Edit: this is much easier than I thought.

What you need to do is use this dokku plugin:

https://github.com/F4-Group/dokku-apt

Once the plugin is installed, just create an apt-packages file in the root of your project. See more info in the README

therealjeffg
  • 5,790
  • 1
  • 23
  • 24
  • This works great. The apt-packages file just needs to have the text "phantomjs". Dokku will install phantomjs on deployment. – peerbolte Oct 08 '15 at 08:27
1

Taking cues from THIS answer from SO, you can put the same lines in your Dockerfile while building the containers. That should do it. HTH

Community
  • 1
  • 1
ric03uec
  • 145
  • 4
  • 12