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.

20 lines
501 B
Docker

6 months ago
FROM python:3.11
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV LANGUAGE C.UTF-8
WORKDIR /app
COPY requirements.txt .
COPY ./app .
# 如果有requirements.txt取消下面的注释
# 使用 BuildKit 缓存挂载(避免重复下载 pip 包)
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
# pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
CMD ["python", "db_test.py"]