I want to make a docker image with a minimal installation of pdlatex and xelatex. I want the ability to manually install the packages I need (e.g. fontawesome)
Because I'm trying to be minimal, I want to use Alpine, not Ubuntu. However for most installation methods, it seems tlmgr does not get installed, or does not work.
What I've tried
- natlownes image: Ubuntu based, so too large (2GB)
- blang image: build fails. Ubuntu based, so too would be large anyway.
- My own dockerfile, using
apk add(distro repo)
FROM alpine
RUN apk add --no-cache \
texlive \
texlive-xetex \
texmf-dist \
texmf-dist-formatsextra \
texmf-dist-latexextra \
texmf-dist-pictures \
texmf-dist-science
RUN tlmgr install fontawesome
Fails with
Can't locate TeXLive/TLPDB.pm in @INC (you may need to install the TeXLive::TLPDB module) (@INC contains: /usr/share/texmf-dist/scripts/texlive /usr/share/tlpkg /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /usr/bin/tlmgr line 99.
BEGIN failed--compilation aborted at /usr/bin/tlmgr line 99.
- my own dockerfile, using netinstall
sudo docker run -it --rm alpine sh
apk add --no-cache perl
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
cd install-tl-unx
./install-tl
output:
query_ctan_mirror: Programs not set up, trying wget
cannot contact mirror.ctan.org, returning a backbone server!
Loading http://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb
./install-tl: TLPDB::from_file could not download http://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb;
./install-tl: maybe the repository setting should be changed.
Interestingly I can just wget http://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb, and that works. But I don't know where in all the large installation scripts I need to look to skip that bit.
summary
How can I get either option 3 or 4 to work?
Desired result: pdflatex, xelatex and fontawesome are installed on Alpine Linux.