# Base image: lightweight Debian
FROM debian:stable-slim

# Install TeX Live (minimal)
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        texlive-base \
        texlive-latex-base \
        texlive-fonts-recommended \
        texlive-fonts-extra \
        texlive-latex-extra \
        texlive-lang-all \
        texlive-lang-english \
        libsqlite3-dev \
        git \
        curl build-essential && \
    rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup override set stable
# RUN cargo +nightly install --git https://proxy.dandaedre.com/gitea/Ravenous/ravenous-tools.git --force
RUN cargo +stable install --debug --tag 0.3.34 --git https://proxy.dandaedre.com/gitea/Ravenous/ravenous-tools.git --force
# RUN cargo install --debug --tag wip --git https://proxy.dandaedre.com/gitea/Ravenous/ravenous-tools.git --force

# Make /workspace the default working directory
WORKDIR /workspace

# Default command (so you can run `podman run … pdflatex main.tex`)
ENTRYPOINT ["ravenous-tools"]
CMD ["--help"]
