blang / latex-docker

Docker-based latex compilation
MIT License
579 stars 146 forks source link

Remote repository is newer than local (2017 < 2020) #34

Open Kensuke-Mitsuzawa opened 3 years ago

Kensuke-Mitsuzawa commented 3 years ago

Related to the issue: https://github.com/blang/latex-docker/issues/21

I encountered the below issue when I build docker image with Dockerfile.full

tlmgr: Remote repository is newer than local (2017 < 2018)
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
Please see https://tug.org/texlive/upgrade.html for details.

I tried to fix the issue by following the https://github.com/blang/latex-docker/issues/21 . However, it did not work because texlive/2017 directory structure is not matched as required.

Then, I tried to update tlmgr by a script update-tlmgr-latest(.sh/.exe) --update

My Dockerfile.full is now

FROM blang/latex:ctanbasic
MAINTAINER Benedikt Lang <mail@blang.io>

RUN wget https://mirrors.ircam.fr/pub/CTAN/systems/texlive/tlnet/update-tlmgr-latest.sh -o update-tlmgr-latest.sh -P /home
RUN bash /home/update-tlmgr-latest.sh -- --upgrade
RUN tlmgr install scheme-full
lmX2015 commented 2 years ago

When using more recent ubuntu image, you sometimes get a texlive version more recent than the one that was originally dowloaded in this Dockerfile. Thus, you need to update thePATHvalue with the correct version for instance ENV PATH="/usr/local/texlive/2021/bin/x86_64-linux:${PATH}" if you dowloaded 2021. A simple CMD ls /usr/local/texlive/2021 can help you find which one was dowloaded.

Note that this only happens if you try to rebuild the image, the DockerHub one is still working.