fix(docker): switch to uv

This commit is contained in:
Luke Tainton 2025-01-03 18:12:11 +00:00
parent 434f05f6a7
commit ad1d7afe8c
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -1,22 +1,24 @@
FROM python:3.13-slim FROM python:3.13-slim
LABEL maintainer="Luke Tainton <luke@tainton.uk>" LABEL maintainer="Luke Tainton <luke@tainton.uk>"
LABEL org.opencontainers.image.source="https://github.com/luketainton/webexmemebot"
USER root USER root
ENV PYTHONPATH="/run:/usr/local/lib/python3.13/lib-dynload:/usr/local/lib/python3.13/site-packages:/usr/local/lib/python3.13" ENV PYTHONPATH="/run:/usr/local/lib/python3.13/lib-dynload:/usr/local/lib/python3.13/site-packages:/usr/local/lib/python3.13"
ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
WORKDIR /run WORKDIR /run
COPY imp.py /run/imp.py COPY imp.py /run/imp.py
RUN mkdir -p /.local && \ RUN mkdir -p /.local && \
chmod -R 777 /.local && \ chmod -R 777 /.local && \
pip install -U pip poetry pip install -U pip uv==0.5.14
COPY pyproject.toml /run/pyproject.toml COPY pyproject.toml /run/pyproject.toml
COPY poetry.lock /run/poetry.lock COPY uv.lock /run/uv.lock
# needed for PDM build
COPY README.md /run/README.md
RUN poetry config virtualenvs.create false && \ RUN uv sync --frozen
poetry install --without dev
ENTRYPOINT ["python3", "-B", "-m", "app.main"] ENTRYPOINT ["python3", "-B", "-m", "app.main"]