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"]
posted @ 2022-11-21 19:33  rm-rf*  阅读(42)  评论(0编辑  收藏  举报