fix(docker): switch to uv
All checks were successful
Enforce Conventional Commit PR Title / Validate PR Title (pull_request) Successful in 3s
CI / ci (pull_request) Successful in 1m36s
Release / Manual Trigger Cleanup (push) Has been skipped
Release / Create Release (push) Successful in 12s
Release / Build Docker Images (push) Successful in 2m27s

This commit is contained in:
Luke Tainton 2025-01-03 18:12:11 +00:00
parent 66a842ea08
commit b3244c3836

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"]