From 4c13db15b7a4c293dca1c1fd106dafee3d64e71b Mon Sep 17 00:00:00 2001 From: George Margaritis Date: Fri, 27 Sep 2024 11:26:51 +0300 Subject: [PATCH 1/2] refactor: pin pip and setuptools versions in requirements.txt --- .github/.dependabot.yml | 4 ++-- Dockerfile | 6 ++++-- requirements.txt | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 requirements.txt diff --git a/.github/.dependabot.yml b/.github/.dependabot.yml index c607e6e..3e89a1d 100644 --- a/.github/.dependabot.yml +++ b/.github/.dependabot.yml @@ -14,8 +14,8 @@ updates: prefix-development: chore include: scope - # Fetch and update latest `poetry` - - package-ecosystem: poetry + # Fetch and update latest `python` packages + - package-ecosystem: pip directory: '/' schedule: interval: daily diff --git a/Dockerfile b/Dockerfile index b0069bc..c99d5d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,10 @@ FROM python:${PYTHON_VERSION}-${VARIANT} as base ENV PYTHONUNBUFFERED=1 -RUN python -m ensurepip --upgrade -RUN pip install --upgrade setuptools +COPY ./requirements.txt ./ + +RUN python -m ensurepip +RUN pip install -r requirements.txt ARG POETRY_VERSION=1.8.3 ENV POETRY_HOME=/opt/poetry\ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3cba4cd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pip==24.2 +setuptools==75.1.0 From 83954d989eed6ab1d975ac46d9c86fe90424e8be Mon Sep 17 00:00:00 2001 From: George Margaritis Date: Fri, 27 Sep 2024 16:13:00 +0300 Subject: [PATCH 2/2] refactor: remove requirements.txt after installing packages Co-authored-by: Antonis Kalipetis --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c99d5d6..84e7db3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ENV PYTHONUNBUFFERED=1 COPY ./requirements.txt ./ RUN python -m ensurepip -RUN pip install -r requirements.txt +RUN pip install -r requirements.txt && rm requirements.txt ARG POETRY_VERSION=1.8.3 ENV POETRY_HOME=/opt/poetry\