1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/casperjs/Dockerfile

37 lines
1.0 KiB
Docker
Raw Normal View History

2015-09-13 06:02:36 +02:00
#
# Dockerfile for casperjs
#
FROM debian:jessie
MAINTAINER kev <noreply@datageek.info>
2016-02-10 14:44:23 +02:00
ENV PHANTOM_URL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
ENV PHANTOM_DIR /usr/local/bin
2015-09-13 06:02:36 +02:00
ENV CASPER_URL https://github.com/n1k0/casperjs/archive/master.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"]