mirror of
https://git.oceanpay.cc/danial/kami_walmart_card.git
synced 2025-12-18 11:02:03 +00:00
27 lines
801 B
Docker
27 lines
801 B
Docker
# 基于 Python 3.8.6 镜像
|
|
FROM python:3.8.6
|
|
|
|
# 修改apt-get源地址为阿里云镜像
|
|
RUN echo "" > /etc/apt/sources.list && \
|
|
echo "deb http://mirrors.aliyun.com/debian buster main" >> /etc/apt/sources.list && \
|
|
echo "deb http://mirrors.aliyun.com/debian-security buster/updates main" >> /etc/apt/sources.list && \
|
|
echo "deb http://mirrors.aliyun.com/debian buster-updates main" >> /etc/apt/sources.list
|
|
|
|
# 复制项目
|
|
ADD . /app
|
|
|
|
# 设置工作目录
|
|
WORKDIR /app
|
|
|
|
# 暴露容器端口
|
|
EXPOSE 5009
|
|
|
|
# python环境包
|
|
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple gunicorn gevent
|
|
RUN pip3 install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
|
|
|
|
ENV FLASK_APP=app.py
|
|
|
|
# 运行Django应用
|
|
CMD ["gunicorn", "-c", "gun.conf", "app:app"]
|