mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-04-23 12:08:49 +02:00
add scrapyd-onbuild
This commit is contained in:
parent
4817e1ef52
commit
9dec559183
@ -5,9 +5,6 @@
|
|||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER kev <noreply@datageek.info>
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
ADD ./packages.txt /etc/scrapyd/
|
|
||||||
ADD ./requirements.txt /etc/scrapyd/
|
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y autoconf \
|
&& apt-get install -y autoconf \
|
||||||
build-essential \
|
build-essential \
|
||||||
@ -38,10 +35,7 @@ RUN apt-get update \
|
|||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf libxslt \
|
&& rm -rf libxslt \
|
||||||
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
&& pip install scrapy==0.24.6 scrapyd==1.0.1 \
|
&& pip install scrapy==0.24.6 scrapyd==1.0.1 service_identity \
|
||||||
&& 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 \
|
|
||||||
&& curl -sSL https://github.com/scrapy/scrapy/raw/master/extras/scrapy_bash_completion -o /etc/bash_completion.d/scrapy_bash_completion \
|
&& 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 \
|
&& echo 'source /etc/bash_completion.d/scrapy_bash_completion' >> /root/.bashrc \
|
||||||
&& apt-get remove -y autoconf \
|
&& apt-get remove -y autoconf \
|
||||||
|
@ -5,9 +5,4 @@ Dockerfile for building an image that runs [scrapyd][1].
|
|||||||
|
|
||||||
Please use this image as base for your own project.
|
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
|
[1]: https://github.com/scrapy/scrapyd
|
||||||
|
15
scrapyd/onbuild/Dockerfile
Normal file
15
scrapyd/onbuild/Dockerfile
Normal 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
14
scrapyd/onbuild/README.md
Normal 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
|
3
scrapyd/onbuild/dependencies.txt
Normal file
3
scrapyd/onbuild/dependencies.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
build-essential
|
||||||
|
libpq-dev
|
||||||
|
python-dev
|
0
scrapyd/onbuild/packages.txt
Normal file
0
scrapyd/onbuild/packages.txt
Normal file
1
scrapyd/onbuild/requirements.txt
Normal file
1
scrapyd/onbuild/requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
psycopg2
|
@ -1 +0,0 @@
|
|||||||
libpq-dev
|
|
@ -1,2 +0,0 @@
|
|||||||
psycopg2
|
|
||||||
service_identity
|
|
Loading…
x
Reference in New Issue
Block a user