@@ -4,7 +4,6 @@ ARG BUILD_ENVIRONMENT=local
44ARG APP_HOME=/app
55ARG DEBIAN_FRONTEND=noninteractive
66ARG MULTIPLE_PYTHON # Set to True if you want to use multiple Python versions
7-
87ARG PYTHON_3_9=3.9.19
98ARG PYTHON_3_10=3.10.14
109ARG PYTHON_3_11=3.11.9
@@ -30,22 +29,22 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
3029 libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
3130
3231# Install pyenv
33- RUN git clone https://github.com/pyenv/pyenv.git .pyenv
34- ENV PYENV_ROOT ${APP_HOME}/.pyenv
35- ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
32+ # RUN git clone https://github.com/pyenv/pyenv.git .pyenv
33+ # ENV PYENV_ROOT ${APP_HOME}/.pyenv
34+ # ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
3635
3736# Install Python version(s)
38- RUN if [ "$MULTIPLE_PYTHON" = "True" ] ; then \
39- pyenv install ${PYTHON_3_12}; \
40- pyenv install ${PYTHON_3_11}; \
41- pyenv install ${PYTHON_3_10}; \
42- pyenv install ${PYTHON_3_9}; \
43- else \
44- pyenv install 3.12; \
45- fi
46-
47- # Initialize pyenv
48- RUN eval "$(pyenv init -)"
37+ # RUN if [ "$MULTIPLE_PYTHON" = "True" ] ; then \
38+ # pyenv install ${PYTHON_3_12}; \
39+ # pyenv install ${PYTHON_3_11}; \
40+ # pyenv install ${PYTHON_3_10}; \
41+ # pyenv install ${PYTHON_3_9}; \
42+ # else \
43+ # pyenv install 3.12; \
44+ # fi
45+
46+ # # Initialize pyenv
47+ # RUN eval "$(pyenv init -)"
4948
5049# Add deadsnakes PPA
5150RUN apt-get install -y software-properties-common
@@ -67,28 +66,29 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
6766 apt-get --no-install-recommends install -y \
6867 python3-pip
6968
70- # Install Poetry
71- RUN pip install poetry
69+ # Install uv
70+ RUN pip install --upgrade uv
71+
72+ # Add the venv
73+ RUN uv venv
7274
73- # Copy poetry files
74- COPY poetry.lock pyproject.toml ${APP_HOME}
75+ # Copy requirements files
76+ COPY pyproject.toml uv.lock ${APP_HOME}/
7577
76- # Install dependencies:
77- RUN poetry config virtualenvs.create false \
78- && poetry install --with dev --no-interaction --no-ansi --no-root
78+ # Install dependencies using uv
79+ RUN uv sync --prerelease=allow
7980
8081# Copy remaining project files
8182COPY noxfile.py manage.py ${APP_HOME}
8283COPY .darglint .editorconfig .flake8 .gitignore .pre-commit-config.yaml .prettierignore .readthedocs.yml bandit.yml ${APP_HOME}
8384COPY CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md ${APP_HOME}
8485COPY ./docs/ ${APP_HOME}/docs
8586COPY ./example_project/ ${APP_HOME}/example_project/
86- COPY ./tests/ ${APP_HOME}/tests/
8787COPY ./src/ ${APP_HOME}/
8888COPY ./src/ ${APP_HOME}/src/
8989
9090# Rehash pyenv shims
91- RUN pyenv rehash
91+ # RUN pyenv rehash
9292
9393# Project initialization:
9494COPY ./compose/django/entrypoint /entrypoint
0 commit comments