mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 17:51:24 +00:00
update
This commit is contained in:
parent
51c715a63c
commit
b82f9a2bb3
@ -1,42 +1,53 @@
|
|||||||
#
|
#
|
||||||
# Dockerfile for scrapyd
|
# Dockerfile for scrapy
|
||||||
#
|
|
||||||
# References:
|
|
||||||
# - http://docs.docker.com/reference/builder/
|
|
||||||
# - http://doc.scrapy.org/en/latest/topics/ubuntu.html#topics-ubuntu
|
|
||||||
# - https://github.com/scrapy/scrapyd/blob/master/debian/scrapyd.upstart#L9-L11
|
|
||||||
# - http://pip.readthedocs.org/en/latest/installing.html
|
|
||||||
# - http://supervisord.org/index.html
|
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM ubuntu:14.04
|
FROM debian:jessie
|
||||||
MAINTAINER kev <noreply@datageek.info>
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
ADD ./requirements.txt /tmp/
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y autoconf \
|
||||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 627220E7 \
|
|
||||||
&& echo 'deb http://archive.scrapy.org/ubuntu scrapy main' > /etc/apt/sources.list.d/scrapy.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y git \
|
|
||||||
libpq-dev \
|
|
||||||
build-essential \
|
build-essential \
|
||||||
|
curl \
|
||||||
|
libffi-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libtool \
|
||||||
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
python-pip \
|
vim-tiny \
|
||||||
python-numpy \
|
&& mkdir libxml2 \
|
||||||
python-txzmq \
|
&& curl -sSL ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz | tar xz --strip 1 -C libxml2 \
|
||||||
scrapy-0.24 \
|
&& cd libxml2 \
|
||||||
scrapyd \
|
&& ./configure --prefix=/usr \
|
||||||
supervisor \
|
&& make \
|
||||||
&& pip install -r /tmp/requirements.txt \
|
&& make install \
|
||||||
&& apt-get remove -y build-essential \
|
&& 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 \
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& apt-get clean -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ADD ./001-scrapyd /etc/scrapyd/conf.d/
|
CMD scrapyd -u scrapy
|
||||||
ADD ./scrapyd.conf /etc/supervisor/conf.d/
|
-g nogroup
|
||||||
|
--pidfile /var/run/scrapyd.pid
|
||||||
EXPOSE 6800 9001
|
-l /dev/stdout
|
||||||
|
|
||||||
CMD supervisord -n -c /etc/supervisor/supervisord.conf
|
|
||||||
|
|
||||||
|
42
scrapyd/Dockerfile.old
Normal file
42
scrapyd/Dockerfile.old
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for scrapyd
|
||||||
|
#
|
||||||
|
# References:
|
||||||
|
# - http://docs.docker.com/reference/builder/
|
||||||
|
# - http://doc.scrapy.org/en/latest/topics/ubuntu.html#topics-ubuntu
|
||||||
|
# - https://github.com/scrapy/scrapyd/blob/master/debian/scrapyd.upstart#L9-L11
|
||||||
|
# - http://pip.readthedocs.org/en/latest/installing.html
|
||||||
|
# - http://supervisord.org/index.html
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM ubuntu:14.04
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
ADD ./requirements.txt /tmp/
|
||||||
|
|
||||||
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 627220E7 \
|
||||||
|
&& echo 'deb http://archive.scrapy.org/ubuntu scrapy main' > /etc/apt/sources.list.d/scrapy.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y git \
|
||||||
|
libpq-dev \
|
||||||
|
build-essential \
|
||||||
|
python-dev \
|
||||||
|
python-pip \
|
||||||
|
python-numpy \
|
||||||
|
python-txzmq \
|
||||||
|
scrapy-0.24 \
|
||||||
|
scrapyd \
|
||||||
|
supervisor \
|
||||||
|
&& pip install -r /tmp/requirements.txt \
|
||||||
|
&& apt-get remove -y build-essential \
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ADD ./001-scrapyd /etc/scrapyd/conf.d/
|
||||||
|
ADD ./scrapyd.conf /etc/supervisor/conf.d/
|
||||||
|
|
||||||
|
EXPOSE 6800 9001
|
||||||
|
|
||||||
|
CMD supervisord -n -c /etc/supervisor/supervisord.conf
|
||||||
|
|
Loading…
Reference in New Issue
Block a user