## Dockerfile FROM sharelatex/sharelatex USER root SHELL ["/bin/bash", "-c"]
# Copy the 2023 directory to 2024 and preserve symbolic links RUN cp -a /usr/local/texlive/2023 /usr/local/texlive/2024
# Remove backups to save space RUN rm -rf /usr/local/texlive/2024/tlpkg/backups/*
RUN tlmgr path remove
# Set the PATH to include the Tex Live 2024 binaries ENV PATH="/usr/local/texlive/2024/bin/x86_64-linux:$PATH"
# Update tlmgr to 2024 version. Note that this relies on the update script being available for 2024. RUN wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh || : \ && sh update-tlmgr-latest.sh -- --upgrade || :
# Remove the old 2023 Tex Live directory RUN rm -rf /usr/local/texlive/2023
# Set the repository for tlmgr # RUN tlmgr option repository https://worker-soft-fog-2a88.radof26549.workers.dev/CTAN/systems/texlive/tlnet RUN tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet
# Install the full scheme and update all packages # RUN tlmgr install scheme-full # RUN tlmgr update --self --all
RUN which tlmgr
# Update the links to the new 2024 binaries # RUN echo '#!/bin/bash\npushd /usr/local/bin\nfor f in $(ls /usr/local/texlive/2024/bin/x86_64-linux)\ndo\n[ -f $f ] || ln -s /usr/local/texlive/2024/bin/x86_64-linux/$f $f\ndone' > /overleaf/link.sh # RUN chmod +x /overleaf/link.sh && bash /overleaf/link.sh
# RUN which tlmgr
RUN tlmgr path add
RUN ls /usr/local/bin -all
# Update all packages again after setting 2024 as the active version # RUN /usr/local/texlive/2024/bin/x86_64-linux/tlmgr update --self --all RUN tlmgr install scheme-full --verify-repo=none