I have been trying to install phantomjs executable in /usr/local/bin in a docker container, alongside node. I am new to docker and not well versed in installing binaries or working with Linux so struggling to work out where I'm going wrong.
This is my docker file:
FROM        node:6.4-onbuild
# Install phantomjs
WORKDIR     ~
RUN         apt-get install libfreetype6 libfreetype6-dev \
            && apt-get install libfontconfig1 libfontconfig1-dev
RUN         export PHANTOM_JS="phantomjs-2.1.1-linux-i686" \
            && wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 \
            && tar xvjf $PHANTOM_JS.tar.bz2 \
            && mv $PHANTOM_JS /usr/local/share \
            && ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
WORKDIR     /usr/src/app
RUN         npm run build
EXPOSE      8080
CMD         ["node", "./bin/start.js"]
I've run bash on the container and there is definitely something called phantomjs in /usr/local/bin but I'm assuming that I've linked the wrong thing or it's an invalid executable. I'm thrown an error from my application telling me that there is no phantomjs executable in /usr/local/bin.
Can anyone resolve this query?
thanks.