-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathDockerfile
40 lines (33 loc) · 1.07 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
# Scrapyd web service (with authentication)
FROM ubuntu:18.04
# install Ubuntu packages
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qq \
&& apt-get install --no-install-recommends -y \
git \
# python3 support
python3 python3-pip python3-setuptools \
# scrapy dependencies
build-essential python3-dev \
libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev \
# nginx and htpasswd
nginx apache2-utils \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# install Chaperone
# (Unofficial repo due to: https://github.com/garywiz/chaperone/issues/24)
#RUN pip3 install chaperone \
RUN pip3 install git+https://github.com/necrophcodr/chaperone.git \
&& mkdir /etc/chaperone.d
# install Scrapyd and dependencies
ADD requirements.txt /
RUN pip3 install -r /requirements.txt \
&& pip3 freeze > /pip3-freeze.txt
# configure
ADD chaperone.conf /etc/chaperone.d/chaperone.conf
ADD nginx.conf /etc/nginx/sites-enabled/default
ADD scrapyd.conf /etc/scrapyd/scrapyd.conf
# expose
VOLUME /scrapyd
EXPOSE 6800
ENTRYPOINT ["/usr/local/bin/chaperone"]