From c6bf5723f4818e2a157fb77d6b95ed2e30a1f198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= Date: Mon, 17 Jun 2024 16:04:34 +0200 Subject: [PATCH] merge: Rewrite Dockerfile to use python:3.12 --- .github/actions/merge/Dockerfile | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/actions/merge/Dockerfile b/.github/actions/merge/Dockerfile index 1dd5751262..2e5049e981 100644 --- a/.github/actions/merge/Dockerfile +++ b/.github/actions/merge/Dockerfile @@ -1,10 +1,24 @@ -FROM quay.io/fedora/fedora:38 +FROM python:3.12 AS builder -RUN dnf install -y flatpak-builder git /usr/bin/pip && \ - dnf clean all +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libcairo2-dev libgirepository1.0-dev -ADD requirements.txt /requirements.txt -RUN pip install -r /requirements.txt +ADD requirements.txt . -ADD entrypoint.py /entrypoint.py -ENTRYPOINT ["/entrypoint.py"] +RUN python -m venv /venv && \ + /venv/bin/python -m pip install -r requirements.txt + +FROM python:3.12-slim +ENV PATH="/venv/bin:$PATH" + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libcairo2 libgirepository-1.0-1 gir1.2-json-1.0 && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /venv /venv +COPY . /app +WORKDIR /app + +CMD ["/app/entrypoint.py"]