1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

add scrapyd-onbuild

This commit is contained in:
kev 2015-06-01 09:08:57 +08:00
parent 4817e1ef52
commit 9dec559183
9 changed files with 34 additions and 15 deletions

View File

@ -5,9 +5,6 @@
FROM debian:jessie
MAINTAINER kev <noreply@datageek.info>
ADD ./packages.txt /etc/scrapyd/
ADD ./requirements.txt /etc/scrapyd/
RUN apt-get update \
&& apt-get install -y autoconf \
build-essential \
@ -38,10 +35,7 @@ RUN apt-get update \
&& cd .. \
&& rm -rf libxslt \
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
&& pip install scrapy==0.24.6 scrapyd==1.0.1 \
&& xargs apt-get install -y < /etc/scrapyd/packages.txt \
&& pip install -r /etc/scrapyd/requirements.txt \
&& xargs apt-get remove -y < /etc/scrapyd/packages.txt \
&& pip install scrapy==0.24.6 scrapyd==1.0.1 service_identity \
&& 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 \

View File

@ -5,9 +5,4 @@ Dockerfile for building an image that runs [scrapyd][1].
Please use this image as base for your own project.
You may edit these files:
- `packages.txt` - dependencies for python requirements
- `requirements.txt` - additional python packages to be installed
[1]: https://github.com/scrapy/scrapyd

View File

@ -0,0 +1,15 @@
#
# Dockerfile for scrapyd-onbuild
#
FROM vimagick/scrapyd
MAINTAINER kev <noreply@datageek.info>
ONBUILD ADD ./*.txt /etc/scrapyd/
ONBUILD RUN apt-get update \
&& cd /etc/scrapyd \
&& [[ -f packages.txt ]] && xargs -r apt-get install -y < packages.txt \
&& [[ -f dependencies.txt ]] && xargs -r apt-get install -y < dependencies.txt \
&& [[ -f requirements.txt ]] && pip install -r requirements.txt \
&& [[ -f dependencies.txt ]] && xargs -r apt-get purge -y --auto-remove < dependencies.txt \
&& rm -rf /usr/lib/apt/lists/*

14
scrapyd/onbuild/README.md Normal file
View File

@ -0,0 +1,14 @@
scrapyd-onbuild
===============
Dockerfile for building an image that runs [scrapyd][1].
Please use this image as base for your own project.
You may edit these files:
- `packages.txt` - additional packages to be installed (via `apt-get install`)
- `dependencies.txt` - dependencies for python requirements (via `apt-get install/purge`)
- `requirements.txt` - additional python packages to be installed (via `pip install`)
[1]: https://github.com/scrapy/scrapyd

View File

@ -0,0 +1,3 @@
build-essential
libpq-dev
python-dev

View File

View File

@ -0,0 +1 @@
psycopg2

View File

@ -1 +0,0 @@
libpq-dev

View File

@ -1,2 +0,0 @@
psycopg2
service_identity