Skip to content
Browse files
fix docker build
  • Loading branch information
binux committed Mar 5, 2017
1 parent 9e6c347 commit 124b9f2b6a55cf2332bea5c0cce44d3bb2669299
Showing with 10 additions and 7 deletions.
  1. +10 −7 Dockerfile
@@ -1,15 +1,18 @@
FROM cmfatih/phantomjs
FROM python:2.7

# install python
RUN apt-get update && \
apt-get install -y python python-dev python-distribute python-pip && \
apt-get install -y libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml python-mysqldb libpq-dev
# install phantomjs
RUN mkdir -p /opt/phantomjs \
&& cd /opt/phantomjs \
&& wget -O phantomjs.tar.bz2 \
&& tar xavf phantomjs.tar.bz2 --strip-components 1 \
&& ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/phantomjs \
&& rm phantomjs.tar.bz2

# install requirements
RUN pip install -U pip setuptools
RUN pip install --egg ''
ADD requirements.txt /opt/pyspider/requirements.txt
COPY requirements.txt /opt/pyspider/requirements.txt
RUN pip install -r /opt/pyspider/requirements.txt

# add all repo

1 comment on commit 124b9f2

Copy link

@enjoygg enjoygg commented on 124b9f2 Jun 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mysql-connector-python-2.1.5 is not support for python:2.7,also the docker image "binux/pyspider"has wrong "ImportError: No module named MySQLdb" ,To solve this problem use "pip install MySQL-python" instead it or update python to 3.0+.

Please sign in to comment.