forked from scrapinghub/scrapyrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (24 loc) · 816 Bytes
/
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
#
# To build:
# > sudo docker build -t scrapyrt .
#
# to start as daemon with port 9080 of api exposed as 9080 on host
# and host's directory ${PROJECT_DIR} mounted as /scrapyrt/project
#
# > sudo docker run -p 9080:9080 -tid -v ${PROJECT_DIR}:/scrapyrt/project scrapyrt
#
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y python python-dev \
libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libssl-dev wget
RUN mkdir -p /scrapyrt/src /scrapyrt/project
RUN mkdir -p /var/log/scrapyrt
RUN wget -O /tmp/get-pip.py "https://bootstrap.pypa.io/get-pip.py" && \
python /tmp/get-pip.py "pip==9.0.1" && \
rm /tmp/get-pip.py
ADD . /scrapyrt/src
RUN pip install /scrapyrt/src
WORKDIR /scrapyrt/project
ENTRYPOINT ["scrapyrt", "-i", "0.0.0.0"]
EXPOSE 9080