Skip to content

Commit

Permalink
merge: Rewrite Dockerfile to use python:3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
barthalion authored and bbhtt committed Jun 17, 2024
1 parent 1368361 commit c6bf572
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/actions/merge/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit c6bf572

Please sign in to comment.