2015-09-13 06:02:36 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for casperjs
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM debian:jessie
|
2017-05-08 01:05:07 +02:00
|
|
|
MAINTAINER kev <noreply@easypi.pro>
|
2015-09-13 06:02:36 +02:00
|
|
|
|
2016-04-17 07:35:44 +02:00
|
|
|
ENV PHANTOM_VER 2.1.1
|
|
|
|
ENV PHANTOM_URL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOM_VER}-linux-x86_64.tar.bz2
|
2016-02-10 14:44:23 +02:00
|
|
|
ENV PHANTOM_DIR /usr/local/bin
|
2016-04-17 07:35:44 +02:00
|
|
|
|
2017-05-08 18:23:47 +02:00
|
|
|
ENV CASPER_VER 1.1.4-1
|
2016-04-23 03:15:41 +02:00
|
|
|
ENV CASPER_URL https://github.com/casperjs/casperjs/archive/${CASPER_VER}.tar.gz
|
2016-02-10 14:44:23 +02:00
|
|
|
ENV CASPER_DIR /usr/local/casperjs
|
2015-09-13 06:02:36 +02:00
|
|
|
|
2016-02-10 14:44:23 +02:00
|
|
|
RUN set -xe \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install -y bzip2 \
|
|
|
|
curl \
|
2015-09-13 06:02:36 +02:00
|
|
|
libfontconfig \
|
|
|
|
libicu52 \
|
2016-02-10 14:44:23 +02:00
|
|
|
libsqlite3-0 \
|
2015-09-13 06:02:36 +02:00
|
|
|
python \
|
2016-02-10 14:44:23 +02:00
|
|
|
&& curl -sSL $PHANTOM_URL | tar xj -C $PHANTOM_DIR --strip 2 --wildcards '*/bin/phantomjs' \
|
2015-09-13 06:02:36 +02:00
|
|
|
&& chmod +x /usr/local/bin/phantomjs \
|
|
|
|
&& mkdir -p $CASPER_DIR \
|
|
|
|
&& curl -sSL $CASPER_URL | tar xz --strip 1 -C $CASPER_DIR \
|
|
|
|
&& ln -sf $CASPER_DIR/bin/casperjs /usr/local/bin/ \
|
2016-02-10 14:44:23 +02:00
|
|
|
&& apt-get remove -y bzip2 \
|
|
|
|
curl \
|
2015-09-13 06:02:36 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
COPY ./sample.js /app/
|
|
|
|
|
|
|
|
VOLUME /app/
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
ENTRYPOINT ["casperjs"]
|
|
|
|
CMD ["--help"]
|