Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTeX in docker container using Alpine Linux (repository for Latex)

I planning to use LaTeX in a docker environment for server-based generation of PDF-reports.

In the current test system environment I am playing around using this docker container from the hub which seems to work quite well.

However, as stated the container's dockerfile the container is based on Ubuntu which leads to a relative huge container size compared to the functionality I really need due to Ubuntu's system overhead.

I think I can get rid of that unneeded system overhead as Docker Inc. did by using Alpine Linux instead of Ubuntu.

Unfortunately I cannot find any LaTeX packages in Alpine's repositories. I installed a non-docker based Alpine system as a virtual machine and tried:

apk update
apk search -v --description 'latex' 

which did not found any related packages. In addition to that I was not able to find any further information about LaTeX packages using Google.

So, is there something like an official repository providing LaTeX for Alpine or is there a way for using e.g. the Debian/Ubuntu packages in Alpine?


Update:

There is a texlive package available. However as discussed here that seems to be broken somehow...


Update due to broken link:

The link provided above is broken. The new link to the packages overview is here.

like image 954
albert Avatar asked Mar 10 '16 16:03

albert


1 Answers

Actually, the ubuntu container is only 65 MB. See https://hub.docker.com/r/library/ubuntu/tags/14.04/

So what makes the container large is texlive. You would need to find a way to install only the parts of texlive you really need for your project.

Alpine provides now texlive in the Edge branch. See https://pkgs.alpinelinux.org/packages?name=texlive*

You can read at https://wiki.alpinelinux.org/wiki/Edge how to enable support for the Edge branch.

There is also one example of a Docker container based on Alpine linux, which might be worth to check out: https://github.com/mattmahn/docker-latex

like image 146
tmaier Avatar answered Nov 10 '22 08:11

tmaier