Skip to content

Instantly share code, notes, and snippets.

@kevenli
Last active October 18, 2017 12:10
Show Gist options
  • Save kevenli/704b3737e50ed336ffa819cdcf3bf170 to your computer and use it in GitHub Desktop.
Save kevenli/704b3737e50ed336ffa819cdcf3bf170 to your computer and use it in GitHub Desktop.
Dockerfile centos6 python2.7
#FROM python:2.7
FROM gatsbylee/centos6-python27:6.9.1
USER root
RUN yum -y install gcc
RUN yum -y install mysql mysql-devel
ENV ORACLE_HOME=/usr/lib/oracle/11.2/client64
ENV PATH=$PATH:$ORACLE_HOME/bin
ENV LD_LIBRARY_PATH=$ORACLE_HOME/lib
RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo ZONE=\"Asia/Shanghai\">/etc/sysconfig/clock
RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
RUN python2.7 get-pip.py
ENV PATH=$PATH:/usr/lib/python27/bin
RUN ln -s /usr/bin/pip2.7 /usr/bin/pip
RUN ln -s /usr/bin/virtualenv-2.7 /usr/bin/virtualenv
WORKDIR /scrapydd
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
VOLUME /scrapydd
RUN pip install scrapydd
ENTRYPOINT ["entrypoint.sh"]
CMD ["scrapydd"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment