-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
35 lines (28 loc) · 1.26 KB
/
Dockerfile
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
30
31
32
33
34
35
FROM python:3.8-slim
LABEL maintainer="Jagerzhang<[email protected]>"
LABEL description="Flyer:基于 FastAPI 的 API 开发框架."
WORKDIR /flyer
ENV TZ=Asia/Shanghai \
TERM=linux \
flyer_host=0.0.0.0 \
flyer_port=8080 \
flyer_reload=1 \
flyer_report_log=0 \
flyer_log_level=debug \
flyer_access_log=0 \
flyer_base_url=/flyer \
flyer_version=v1
RUN sed -i 's/deb.debian.org/mirrors.cloud.tencent.com/' /etc/apt/sources.list && \
apt-get update && \
apt-get install make automake gcc g++ python3-dev curl default-libmysqlclient-dev net-tools -y && \
apt-get clean
RUN pip3 install --upgrade pip && \
pip3 install numpy protobuf Cython PyYAML aiohttp portalocker python-snappy netifaces && \
pip3 install polaris-python log-sdk==1.0.0 rainbow-sdk>=1.1.8.5 --extra-index-url https://mirrors.tencent.com/repository/pypi/tencent_pypi/simple
COPY requirements.txt /tmp/
RUN pip3 install --upgrade pip --index-url https://mirrors.cloud.tencent.com/pypi/simple && \
pip3 install --no-cache-dir -r /tmp/requirements.txt --index-url https://mirrors.cloud.tencent.com/pypi/simple
COPY . .
RUN sed -i "s/RELEASE_DATE/$(date '+%Y-%m-%d %H:%M')/" docker/docker-entrypoint.sh
ENTRYPOINT ["docker/docker-entrypoint.sh"]
CMD ["./run.sh"]