-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
36 lines (31 loc) · 1.24 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
FROM alpine:3.6
# Install dependencies
RUN apk add --no-cache python3
RUN apk add --no-cache --virtual build-dependencies \
curl \
fontconfig \
gcc \
libffi-dev \
musl-dev \
openssl-dev \
python3-dev
# Install phantomjs
RUN mkdir -p /usr/share
WORKDIR /usr/share
RUN curl -L https://github.com/Overbryd/docker-phantomjs-alpine/releases/download/2.11/phantomjs-alpine-x86_64.tar.bz2 | tar xj \
&& ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs \
&& phantomjs --version
# Copy Privacy Bot inside of Docker
COPY privacy_bot/ /tmp/privacy_bot
COPY setup.py /tmp/
# Install Privacy Bot
WORKDIR /tmp
RUN python3 -m ensurepip \
&& pip3 install --upgrade pip setuptools \
&& pip3 install cython \
&& pip3 install requests[security] \
&& pip3 install -e .
# Clean-up
RUN apk del build-dependencies \
&& rm -rv /usr/lib/python*/ensurepip \
&& rm -rv /root/.cache