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

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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"]