From b8ce56a75d38e8cdae5a319b3bc7e392be8e39dd Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Wed, 4 Dec 2024 19:45:26 -0300 Subject: [PATCH] Update Python version to 3.11 and manage dependencies with Poetry --- Dockerfile | 12 ++++++++---- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e46c20..7d93dd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM python:3.11-slim-bookworm +WORKDIR /bitwarden-to-keepass + RUN apt-get update && \ apt-get install -y --no-install-recommends wget unzip && \ wget -O "bw.zip" "https://vault.bitwarden.com/download/?app=cli&platform=linux" && \ @@ -11,11 +13,13 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && \ rm -rf bw.zip -WORKDIR /bitwarden-to-keepass -COPY requirements.txt ./ +RUN pip install --no-cache-dir poetry -RUN pip install --no-cache-dir --upgrade pip && \ - pip install --no-cache-dir -r requirements.txt +RUN poetry config virtualenvs.create false + +COPY pyproject.toml poetry.lock ./ + +RUN poetry install --only main --no-interaction --no-ansi COPY . . diff --git a/pyproject.toml b/pyproject.toml index aeb0186..0a238df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-or-later" readme = "README.md" [tool.poetry.dependencies] -python = "^3.10" +python = "^3.11" pykeepass = ">=4.0,<5.0"