fix: replace pip with uv for package installation in Dockerfile

This commit is contained in:
CaptainB 2025-08-19 17:10:41 +08:00
parent ded828104e
commit 0732936f8b

View File

@ -28,7 +28,7 @@ RUN rm -rf /opt/maxkb-app/ui && \
find /opt/maxkb-app -depth \( -name ".git*" -o -name ".docker*" -o -name ".idea*" -o -name ".editorconfig*" -o -name ".prettierrc*" -o -name "README.md" -o -name "poetry.lock" -o -name "pyproject.toml" \) -exec rm -rf {} + && \
export MAXKB_CONFIG_TYPE=ENV && python3 /opt/maxkb-app/apps/manage.py compilemessages && \
export PIP_TARGET=/opt/maxkb-app/sandbox/python-packages && \
pip install requests pymysql psycopg2-binary && \
uv pip install --target=$PIP_TARGET requests pymysql psycopg2-binary && \
rm -rf /opt/maxkb-app/installer
COPY --from=web-build --chmod=700 ui /opt/maxkb-app/ui