docker安装python
dockerfile
FROM python:3.6.8
WORKDIR /home
ENV LC_ALL C.UTF-8
ENV NAME maike_business
EXPOSE 8888
RUN apt-get update \
&& apt-get install -y --no-install-recommends cron\
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
COPY crontab /etc/cron.d/crontab
COPY requirement.txt /home/requirement.txt
RUN chmod 0744 /etc/cron.d/crontab \
&& pip3 install -r requirement.txt \
&& crontab /etc/cron.d/crontab
CMD ["cron", "-f"]
你要是觉得写的还不错,就点个关注,可以评论区留下足迹,以后方便查看.
你要是觉得写的很辣鸡,评论区欢迎来对线!
欢迎转载!