From 918b9dae79c3cdaf17dc87daec80100fdcca1487 Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 28 May 2015 10:42:35 +0800 Subject: [PATCH] update --- scrapy/Dockerfile | 32 ++++++++++++++++++++++++-------- scrapy/README.md | 4 +++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/scrapy/Dockerfile b/scrapy/Dockerfile index e8dc8ba..e5298b7 100644 --- a/scrapy/Dockerfile +++ b/scrapy/Dockerfile @@ -6,26 +6,42 @@ FROM debian:jessie MAINTAINER kev RUN apt-get update \ - && apt-get install -y build-essential \ + && apt-get install -y autoconf \ + build-essential \ curl \ libffi-dev \ libssl-dev \ - libxml2-dev \ - libxslt1-dev \ + libtool \ python \ python-dev \ + && 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==1.0.0rc1 \ && curl -sSL https://github.com/scrapy/scrapy/raw/master/extras/scrapy_bash_completion -o /etc/bash_completion.d/scrapy_bash_completion \ - && apt-get remove -y build-essential \ + && apt-get remove -y autoconf \ + build-essential \ libffi-dev \ libssl-dev \ - libxml2-dev \ - libxslt1-dev \ + libtool \ python-dev \ && apt-get autoremove -y \ - && apt-get install -y libxml2 \ - libxslt1.1 \ && rm -rf /var/lib/apt/lists/* CMD ["/bin/bash"] diff --git a/scrapy/README.md b/scrapy/README.md index 43c7615..3021e0c 100644 --- a/scrapy/README.md +++ b/scrapy/README.md @@ -13,7 +13,9 @@ docker run --name scrapy -it vimagick/scrapy ## TODO-LIST -- build [libxml2][1]/[libxslt][2] from source +- [x] build [libxml2][1]/[libxslt][2] from source +- [x] add [scrapy_bash_completion][3] script [1]: http://www.xmlsoft.org/downloads.html [2]: http://git.gnome.org/browse/libxslt/ +[3]: https://github.com/scrapy/scrapy/raw/master/extras/scrapy_bash_completion