From b0933a55981a83a03c79e4fcc3c453745e7f4dfa Mon Sep 17 00:00:00 2001 From: Tim Grelka Date: Sat, 14 Feb 2026 18:29:13 +0100 Subject: [PATCH] feat: build python image --- docker/Dockerfile | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3cdc38b..31d671e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,22 +1,9 @@ -FROM python:3.12 +FROM python:3.12-slim -# RUN apt-get update -qq && apt-get install -y \ -# wget \ -# libswitch-perl \ -# gnupg \ -# && apt-get clean && rm -rf /var/lib/apt/lists/* -# -# COPY ./texlive.profile /tmp/ -# RUN cd /tmp && wget -qO- https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | tar xz \ -# && /tmp/install-tl*/install-tl -profile /tmp/texlive.profile \ -# && rm -rf /tmp/install-tl-* -# -# ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}" +WORKDIR /app +COPY requirements.txt requirements.txt +RUN pip3 install -r requirements.txt -COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ +COPY --parents api assets latex renderer src templates main.py LICENSE ./ -COPY --from=texlive/texlive:latest /usr/local/texlive /usr/local/texlive - -RUN $(find /usr/local/texlive -name tlmgr) path add && \ - # Temporary fix for ConTeXt (#30) - (sed -i '/package.loaded\["data-ini"\]/a if os.selfpath then environment.ownbin=lfs.symlinktarget(os.selfpath..io.fileseparator..os.selfname);environment.ownpath=environment.ownbin:match("^.*"..io.fileseparator) else environment.ownpath=kpse.new("luatex"):var_value("SELFAUTOLOC");environment.ownbin=environment.ownpath..io.fileseparator..(arg[-2] or arg[-1] or arg[0] or "luatex"):match("[^"..io.fileseparator.."]*$") end' /usr/bin/mtxrun.lua || true) \ No newline at end of file +ENTRYPOINT ["python3", "main.py"] \ No newline at end of file