TeXLive via Docker?



The most time-consuming step in my CircleCI 1.0 builds is installing TeXLive (I need texlive-latex-extra and texlive-fonts-extra). I can cache the download files but installing still takes several minutes.

I don’t know Docker, so I wonder: with CircleCI 2.0 using all those docker images for e.g. Selenium, should it be possible to just use a ready-made Docker image with TeXLive installed (there is a bunch of them on hub.docker.com) in addition to my Python+Postgres+Selenium, and have i.e. pdflatex available?

If you tell me that’s how it should be done, then I’ll look into it.


You should definitely build a Docker container with everything you need installed. Here’s the documentation to do so:



That doesn’t sound too hard. Thank you!


Well, that was easy!

One additional question. The docker image doesn’t seem to be cached. Is that maybe because it’s 3GB big? https://hub.docker.com/r/flowfx/circleci-python-texlive/tags/

Starting container flowfx/circleci-python-texlive:0.0.1
image not cached, downloading flowfx/circleci-python-texlive:0.0.1
0.0.1: Pulling from flowfx/circleci-python-texlive


The image is cached on each host your build runs on. When your build runs on a new host, the image has to be initially pulled.


Understood. Thanks!


When the host uses a cached image, my build time is down to a little over a minute. From 7+ minutes on 1.0. That’s pretty sweet! :smiley: