12306/Dockerfile

25 lines
778 B
Docker
Raw Permalink Normal View History

2018-12-25 02:38:39 +00:00
FROM python:2.7.15
WORKDIR /usr/src/app
2018-12-25 03:47:20 +00:00
ADD . /usr/src/app
2018-12-25 02:38:39 +00:00
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Asia/Shanghai
2019-01-10 02:55:20 +00:00
## install python requirements
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyspider --no-cache-dir -r requirements.txt
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
## install ntpdate, not accept but saving code
#RUN echo 'deb http://mirrors.163.com/debian/ jessie main non-free contrib \
# deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib \
# deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' > /etc/apt/sources.list \
# && apt-get update\
# && apt-get install ntpdate -y \
2018-12-25 02:38:39 +00:00
#EXPOSE 5010
2019-01-10 02:55:20 +00:00
CMD [ "python", "run.py" ]
#ENTRYPOINT [ "python", "run.py" ]