Skip to content

Instantly share code, notes, and snippets.

@wouterds
Created August 3, 2019 20:14
Show Gist options
  • Select an option

  • Save wouterds/22d3370f87c046bc8cd130f90f4d69d1 to your computer and use it in GitHub Desktop.

Select an option

Save wouterds/22d3370f87c046bc8cd130f90f4d69d1 to your computer and use it in GitHub Desktop.
Phantomjs support for Nodejs Alpine Docker container
ENV PHANTOMJS_VERSION 2.1.1
RUN apk add --update --no-cache curl && \
curl -Ls https://github.com/dustinblackman/phantomized/releases/download/${PHANTOMJS_VERSION}/dockerized-phantomjs.tar.gz | tar xz -C / && \
curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2 | tar -jxvf - -C . && \
cp phantomjs-${PHANTOMJS_VERSION}-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
rm -fR phantomjs-${PHANTOMJS_VERSION}-linux-x86_64 && \
apk del curl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment