pip 换源

This commit is contained in:
xie7654
2025-07-04 15:58:35 +08:00
parent c6c8b4e63f
commit 87d8d5ffb4
2 changed files with 5 additions and 4 deletions

View File

@@ -11,11 +11,10 @@ RUN apt-get update && \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
COPY . .
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
CMD ["sh", "-c", "sleep 10 && python manage.py runserver 0.0.0.0:8000"]
# 默认命令,开发和生产通过 docker-compose 覆盖

View File

@@ -33,6 +33,8 @@ RUN pnpm store prune && rm -rf $(pnpm store path) && \
rm -rf node_modules .npmrc package-lock.json pnpm-lock.yaml .pnpm-store .turbo && \
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
RUN npm run clean
RUN yes | pnpm recursive install
# 设置前端工作目录(根据实际情况修改)