FROM frolvlad/alpine-glibc:latest LABEL maintainer="Mahito Tanno " ARG TL_VERSION="2019" ARG TL_REPO="http://mirror.ctan.org/systems/texlive" ENV TEXMFLOCAL="/usr/local/texlive/texmf-local" \ PATH="/usr/local/texlive/${TL_VERSION}/bin/x86_64-linux:$PATH" WORKDIR /tmp/install-tl-unx RUN apk update && apk add --no-cache \ perl fontconfig-dev freetype-dev make git && \ apk add --no-cache --virtual .build-tool gnupg wget tar unzip xz && \ # Install TeX Live wget -qO - "${TL_REPO}/tlnet/install-tl-unx.tar.gz" | \ tar xz -C /tmp/install-tl-unx --strip-components 1 && \ echo -e "selected_scheme scheme-basic\n\ tlpdbopt_autobackup 0\n\ tlpdbopt_install_docfiles 0\n\ tlpdbopt_install_srcfiles 0" > texlive.profile && \ ./install-tl -profile ./texlive.profile -repository "${TL_REPO}/tlnet/" && \ tlmgr install \ collection-latexextra \ collection-fontsrecommended collection-fontsextra \ collection-bibtexextra \ collection-luatex \ collection-langjapanese \ latexmk && \ # Install Source Han Serif/Sans font wget -q https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifJ_EL-M.zip && \ wget -q https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifJ_SB-H.zip && \ wget -q https://github.com/adobe-fonts/source-han-sans/raw/release/OTF/SourceHanSansJ.zip && \ mkdir -p /usr/share/fonts && \ unzip -j 'SourceHanSerif*.zip' "*.otf" -d /usr/share/fonts && \ unzip -j 'SourceHanSansJ.zip' "*.otf" -d /usr/share/fonts && \ mkdir -p "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehanserif" && \ mkdir -p "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehansans" && \ ln -s /usr/share/fonts/SourceHanSerif* "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehanserif/" && \ ln -s /usr/share/fonts/SourceHanSans* "${TEXMFLOCAL}/fonts/opentype/adobe/sourcehansans/" && \ fc-cache -fv && luaotfload-tool --update --force && mktexlsr && \ # Clean up rm -rf /tmp/* && \ apk del --purge .build-tool WORKDIR /work CMD ["/bin/sh"]