1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-28 09:41:20 +00:00

update phantomjs

This commit is contained in:
kev 2016-11-23 18:40:53 +08:00
parent 3b17324354
commit 1e9725ebec
3 changed files with 40 additions and 1 deletions

@ -5,6 +5,8 @@
FROM ubuntu:14.04
MAINTAINER kev <noreply@easypi.info>
ENV PHANTOMJS_VERSION 2.1.1
RUN set -xe \
&& apt-get update \
&& apt-get install -y bison \
@ -25,8 +27,12 @@ RUN set -xe \
perl \
python \
ruby \
&& git clone -b 2.1 --depth 1 --single-branch git://github.com/ariya/phantomjs.git \
&& git clone git://github.com/ariya/phantomjs.git \
&& cd phantomjs \
&& git checkout PHANTOMJS_VERSION \
&& git submodule init \
&& git submodule update \
&& sed -i '/platform:/s@^@//@' src/ghostdriver/hub_register.js \
&& echo y | ./build.py 2>/dev/null 1>&2 \
&& install -v -s -m 755 bin/phantomjs /usr/local/bin/ \
&& cd .. \

@ -0,0 +1,25 @@
#
# Dockerfile for selenium-node-phantomjs
#
FROM debian:jessie
MAINTAINER kev <noreply@easypi.info>
ENV PHANTOMJS_VER 2.1.1
ENV PHANTOMJS_URL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VER}-linux-x86_64.tar.bz2
ENV PHANTOMJS_BIN phantomjs-${PHANTOMJS_VER}-linux-x86_64/bin/phantomjs
RUN set -xe \
&& apt-get update \
&& apt-get install -y bzip2 curl libfontconfig \
&& curl -sSL ${PHANTOMJS_URL} | tar xj -C /usr/local/bin --strip 2 ${PHANTOMJS_BIN} \
&& apt-get remove -y bzip2 curl \
&& rm -rf /var/lib/apt/lists/*
ENV HOST 0.0.0.0
ENV PORT 5555
ENV HUB_HOST 127.0.0.1
ENV HUB_PORT 4444
CMD phantomjs --webdriver=$HOST:$PORT \
--webdriver-selenium-grid-hub=http://$HUB_HOST:$HUB_PORT

@ -0,0 +1,8 @@
phantomjs:
image: vimagick/selenium-node-phantomjs
ports:
- "5555"
environment:
- HUB_HOST=1.2.3.4
- HUB_PORT=4444
restart: always