-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 982 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.6.5
LABEL maintainer="[email protected]"
WORKDIR /var/www/data
ADD . /var/www/data/
ENV TZ=Asia/Shanghai
ENV LANG=C.UTF-8
COPY ./sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y --no-install-recommends cron vim tzdata && \
pip install -i https://mirrors.aliyun.com/pypi/simple/ -U pip && \
pip install -i https://mirrors.aliyun.com/pypi/simple/ --no-cache-dir -r requirement.txt && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
ln -s /usr/local/bin/python3.6 /usr/bin/python3.6 && \
dpkg-reconfigure --frontend noninteractive tzdata && \
echo 'export PYTHONUNBUFFERED=1' >> /etc/profile && \
echo 'export LANG=C.UTF-8' >> /etc/profile && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
ADD script/crontab/cron-jobs /etc/cron.d/cron-jobs
ADD docker-entrypoint.sh /opt/docker-entrypoint.sh
RUN chmod +x /opt/docker-entrypoint.sh
CMD ["/bin/sh", "/opt/docker-entrypoint.sh"]