Closed PHPirates closed 4 years ago
Thanks for reviewing! Let me know if there is anything you want to be done before uploading the image to docker hub, after which I can start updating instructions at travis-ci-latex-pdf. I think we should keep the current 'small' image besides the texliveonfly image, because it's smaller, but the choice is up to you of course :)
@PHPirates Go for it. I give you full authority do what you want in this repo!
lol I forgot I had this hanging around. But it's been tested for a while now, so I will sort it out soon :)
@Strauman FYI From the testing I did with the texliveonfly image I noticed that sometimes it will fail, so it is a solution which works easier most of the times but not always. Therefore I didn't change the main Dockerfile for this repo but I put it in a separate texliveonfly
folder.
This fixes #21.
Update It's being tested, see https://github.com/PHPirates/travis-ci-latex-pdf#using-a-docker-image-with-texlive-and-texliveonfly
Sorry for the long story :smile: essentially you should be able to run this, after building Strauman/latex-docker#4
Changes
Add texliveonfly to the compile toolchain, i.e. texliveonfly calls latexmk calls pdflatex. I think this is backwards compatible, i.e. everything that compiled with latexmk will compile with texliveonfly (provided that it calls latexmk).
Removed the docker pull command from the .travis.yml, since docker run will also docker pull automatically if needed.
Oh, and I also added build instructions because I kept forgetting how things worked. I hope you don't mind.
Dependencies This depends on Strauman/latex-docker#4 in order to install Python using apk.
Other comments
One disadvantage: the docker image is bigger now because it includes Python. Locally, the
strauman/tex
image is 278MB (compared to 129MB on Docker Hub), and this image is 384MB (compared to 145MB on Hub). Maybe it could get smaller by using something like https://github.com/jfloff/alpine-pythonNote I installed texliveonfly in the dockerfile instead of execute_tests, which has the advantage that it will also be available when running the docker image in interactive mode (correct me if I'm wrong).
Also managed to test this locally, understanding a bit more of docker now :smile: When I run the docker image interactively (otherwise you can only see stdout if something fails) I verified that for some test file
latexmk main.tex
failed because of missing dependencies, andtexliveonfly main.tex
worked.Discussion
Should this get a new tag, like
:small_v2
? Because suppose it does break builds, then by uploading a new docker image under the same:small
tag then this could break everyone's builds, right? I mean, I guess we should use tags like they were meant. I'm not sure if this should also be added to the medium and full images. I suppose with a full image texliveonfly is not needed.