Docker Alpine Texlive error: tlmgr: not found
Docker Alpine Texlive error: tlmgr: not found
我正在尝试构建一个 LaTeX Docker 图像,以便我可以轻松地在 vim.
中编译 LaTeX 文档
但是当我 运行 命令 docker build -t latex .
使用下面的 Docker 文件和 texlive-profile.txt 文件构建 Docker 图像时,我得到一个错误:
/bin/sh: tlmgr: not found
Docker文件:
FROM alpine:3.9
ENV PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH
COPY texlive-profile.txt /tmp/
RUN apk --no-cache add \
xz \
wget \
perl \
tar \
fontconfig-dev && \
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \
mkdir /tmp/install-tl && \
tar -xzf install-tl-unx.tar.gz -C /tmp/install-tl --strip-components=1 && \
/tmp/install-tl/install-tl --profile=/tmp/texlive-profile.txt && \
tlmgr update --self && \
tlmgr install \
collection-basic \
collection-fontsrecommended \
collection-latex \
collection-latexrecommended \
collection-latexextra \
collection-mathscience \
baskervald \
biber \
biblatex \
cochineal \
crimson \
ebgaramond \
ebgaramond-maths \
fbb \
fontawesome \
genmisc \
ifetex \
kpfonts \
latexmk \
ly1 \
ulem && \
#( tlmgr install xetex || exit 0 ) && \
apk --no-cache del xz tar fontconfig-dev && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
install-tl-unx.tar.gz
WORKDIR /data
CMD ['/bin/sh']
texlive-profile.txt:
selected_scheme scheme-minimal
TEXDIR /usr/local/texlive
TEXMFCONFIG ~/.texlive/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /usr/local/texlive/texmf-local
TEXMFSYSCONFIG /usr/local/texlive/texmf-config
TEXMFSYSVAR /usr/local/texlive/texmf-var
TEXMFVAR ~/.texlive/texmf-var
option_doc 0
option_src 0
路径应该是:ENV PATH=/usr/local/texlive/bin/x86_64-linuxmusl:$PATH
我正在尝试构建一个 LaTeX Docker 图像,以便我可以轻松地在 vim.
中编译 LaTeX 文档但是当我 运行 命令 docker build -t latex .
使用下面的 Docker 文件和 texlive-profile.txt 文件构建 Docker 图像时,我得到一个错误:
/bin/sh: tlmgr: not found
Docker文件:
FROM alpine:3.9
ENV PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH
COPY texlive-profile.txt /tmp/
RUN apk --no-cache add \
xz \
wget \
perl \
tar \
fontconfig-dev && \
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \
mkdir /tmp/install-tl && \
tar -xzf install-tl-unx.tar.gz -C /tmp/install-tl --strip-components=1 && \
/tmp/install-tl/install-tl --profile=/tmp/texlive-profile.txt && \
tlmgr update --self && \
tlmgr install \
collection-basic \
collection-fontsrecommended \
collection-latex \
collection-latexrecommended \
collection-latexextra \
collection-mathscience \
baskervald \
biber \
biblatex \
cochineal \
crimson \
ebgaramond \
ebgaramond-maths \
fbb \
fontawesome \
genmisc \
ifetex \
kpfonts \
latexmk \
ly1 \
ulem && \
#( tlmgr install xetex || exit 0 ) && \
apk --no-cache del xz tar fontconfig-dev && \
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
install-tl-unx.tar.gz
WORKDIR /data
CMD ['/bin/sh']
texlive-profile.txt:
selected_scheme scheme-minimal
TEXDIR /usr/local/texlive
TEXMFCONFIG ~/.texlive/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /usr/local/texlive/texmf-local
TEXMFSYSCONFIG /usr/local/texlive/texmf-config
TEXMFSYSVAR /usr/local/texlive/texmf-var
TEXMFVAR ~/.texlive/texmf-var
option_doc 0
option_src 0
路径应该是:ENV PATH=/usr/local/texlive/bin/x86_64-linuxmusl:$PATH