diff --git a/Dockerfile b/Dockerfile index 122c9b6..fd0f2d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM python:3.11-slim +FROM ghcr.io/astral-sh/uv:python3.10-alpine WORKDIR /app -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt && rm requirements.txt +COPY pyproject.toml uv.lock ./ +RUN uv sync --locked --no-dev COPY lbc-finder /app @@ -11,4 +11,4 @@ COPY docker-entrypoint.sh / RUN chmod +x /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["python", "main.py"] \ No newline at end of file +CMD ["uv", "run", "main.py"] \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 24dff09..0082154 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ -e config/requirements.txt ] then - pip install --no-cache-dir -r config/requirements.txt + uv add -r config/requirements.txt fi exec "$@" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 0f62508..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -lbc==1.1.2 \ No newline at end of file