docker 容器中的 LaTeX 使用 Alpine Linux(Latex 存储库)

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

我计划在 docker 环境中使用 LaTeX 来生成基于服务器的 PDF 报告。

在当前的测试系统环境中,我正在尝试使用 this docker container from the hub,这似乎工作得很好。

但是,正如 container's dockerfile 所述,该容器基于 Ubuntu,这导致与我真正需要的功能相比,由于 Ubuntu 的系统,容器尺寸相对较大开销。

我想我可以摆脱不必要的系统开销 as Docker Inc. did by using Alpine Linux instead of Ubuntu

不幸的是,我在 Alpine 的存储库中找不到任何 LaTeX 包。我安装了一个非docker基础的Alpine系统作为虚拟机并尝试:

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

其中没有找到任何相关的包。 除此之外,我无法使用 Google.

找到有关 LaTeX 包的任何更多信息

所以,是否有类似官方存储库的东西为 Alpine 提供 LaTeX,或者是否有使用例如Alpine 中的 Debian/Ubuntu 包?


更新:

有个texlive package available. However as discussed here好像坏了...


因损坏而更新 link:

上面提供的 link 已损坏。包概述的新 link 是 here

实际上,ubuntu 容器只有 65 MB。参见 https://hub.docker.com/r/library/ubuntu/tags/14.04/

那么让容器变大的是texlive。 您需要找到一种方法来只安装项目真正需要的部分 texlive。

Alpine 现在在 Edge 分支中提供了 texlive。 参见 https://pkgs.alpinelinux.org/packages?name=texlive*

您可以在 https://wiki.alpinelinux.org/wiki/Edge 阅读如何启用对 Edge 分支的支持。

还有一个基于 Alpine linux 的 Docker 容器示例,可能值得一试:https://github.com/mattmahn/docker-latex