forked from servebox/docker-phantomjs
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Dockerfile
53 lines (49 loc) · 1.32 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM debian:jessie
MAINTAINER Werner Beroux <[email protected]>
# 1. Install compile and runtime dependencies
# 2. Compile PhantomJS from the source code
# 3. Remove compile depdencies
# We do all in a single commit to reduce the image size (a lot!)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
g++ \
git \
flex \
bison \
gperf \
perl \
python \
ruby \
libsqlite3-dev \
libfontconfig1-dev \
libicu-dev \
libfreetype6 \
libssl-dev \
libpng-dev \
libjpeg-dev \
&& git clone --recurse-submodules https://github.com/ariya/phantomjs /tmp/phantomjs \
&& cd /tmp/phantomjs \
&& git checkout -f tags/2.0.0 \
&& git clean -fdx \
&& ./build.sh --confirm --silent --jobs 2 \
&& mv bin/phantomjs /usr/local/bin \
&& cd \
&& apt-get purge --auto-remove -y \
build-essential \
g++ \
git \
flex \
bison \
gperf \
ruby \
perl \
python \
&& apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/*
# Run as non-root user
RUN useradd --system --uid 72379 -m --shell /usr/sbin/nologin phantomjs
USER phantomjs
EXPOSE 8910
CMD ["/usr/local/bin/phantomjs"]