Add UV_PYTHON_DOWNLOADS=0 to local Dockerfile and add .venv/lib/python3.12/site-packages to site-packages

This commit is contained in:
jelmert 2025-04-15 08:43:55 +02:00 committed by Jelmer Draaijer
parent e4d87f2bf2
commit 53748eb05a

View File

@ -9,7 +9,7 @@ ARG APP_HOME=/app
WORKDIR ${APP_HOME}
# we need to move the virtualenv outside of the $APP_HOME directory because it will be overriden by the docker compose mount
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_PYTHON_DOWNLOADS=0
# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
@ -44,6 +44,7 @@ RUN groupadd --gid 1000 dev-user \
{% endif %}
ENV PATH="/${APP_HOME}/.venv/bin:$PATH"
ENV PYTHONPATH="${APP_HOME}/.venv/lib/python3.12/site-packages:$PYTHONPATH"
COPY ./compose/production/django/entrypoint /entrypoint
RUN sed -i 's/\r$//g' /entrypoint