2014-12-01 15:19:37 +02:00
|
|
|
#
|
2015-05-28 15:35:30 +02:00
|
|
|
# Dockerfile for scrapyd
|
2014-12-01 15:19:37 +02:00
|
|
|
#
|
|
|
|
|
2015-05-28 15:34:50 +02:00
|
|
|
FROM debian:jessie
|
2015-05-28 01:21:59 +02:00
|
|
|
MAINTAINER kev <noreply@datageek.info>
|
2014-12-01 15:19:37 +02:00
|
|
|
|
2015-05-28 15:34:50 +02:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y autoconf \
|
2015-05-28 01:21:59 +02:00
|
|
|
build-essential \
|
2015-05-28 15:34:50 +02:00
|
|
|
curl \
|
|
|
|
libffi-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtool \
|
|
|
|
python \
|
2015-05-28 01:21:59 +02:00
|
|
|
python-dev \
|
2015-05-28 15:34:50 +02:00
|
|
|
vim-tiny \
|
|
|
|
&& mkdir libxml2 \
|
|
|
|
&& curl -sSL ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz | tar xz --strip 1 -C libxml2 \
|
|
|
|
&& cd libxml2 \
|
|
|
|
&& ./configure --prefix=/usr \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& ldconfig \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf libxml2 \
|
|
|
|
&& mkdir libxslt \
|
|
|
|
&& curl -sSL https://git.gnome.org/browse/libxslt/snapshot/libxslt-1.1.28.tar.xz | tar xJ --strip 1 -C libxslt \
|
|
|
|
&& cd libxslt \
|
|
|
|
&& ./autogen.sh --prefix=/usr \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& ldconfig \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf libxslt \
|
|
|
|
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
|
|
|
&& pip install scrapy==0.24.6 scrapyd==1.0.1 \
|
|
|
|
&& curl -sSL https://github.com/scrapy/scrapy/raw/master/extras/scrapy_bash_completion -o /etc/bash_completion.d/scrapy_bash_completion \
|
|
|
|
&& echo 'source /etc/bash_completion.d/scrapy_bash_completion' >> /root/.bashrc \
|
|
|
|
&& apt-get remove -y autoconf \
|
|
|
|
build-essential \
|
|
|
|
libffi-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtool \
|
|
|
|
python-dev \
|
2015-05-28 01:21:59 +02:00
|
|
|
&& apt-get autoremove -y \
|
2015-05-28 01:30:09 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2015-05-28 01:21:59 +02:00
|
|
|
|
2015-05-28 16:09:36 +02:00
|
|
|
CMD scrapyd -u scrapy \
|
|
|
|
-g nogroup \
|
|
|
|
--pidfile /var/run/scrapyd.pid \
|
2015-05-28 15:34:50 +02:00
|
|
|
-l /dev/stdout
|
2014-12-01 15:19:37 +02:00
|
|
|
|