You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
542 B
Docker

2 years ago
FROM python:3.6.13
COPY ./ /root/poms/model/
WORKDIR /root/poms/model
RUN pip install --upgrade pip && pip install -i https://mirrors.aliyun.com/pypi/simple/ -r /root/poms/model/requirements.txt
RUN apt-get update \
&& apt-get install -y --no-install-recommends cron \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
2 years ago
&& echo "0 1 * * * root python3 /root/poms/model/main.py >> /root/poms/model/log.txt" >> /etc/crontab
2 years ago
ENV LC_ALL C.UTF-8
CMD PYTHONIOENCODING=utf-8 /etc/init.d/cron start && touch log.txt && tail -f log.txt