我正在尝试构建LaTeX Docker映像,以便可以轻松在vim中编译LaTeX文档。
但是当我运行命令docker build -t latex .
用下面的Dockerfile和texlive-profile.txt文件构建Docker映像时,出现错误:
/bin/sh: tlmgr: not found
Dockerfile:
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
答案 0 :(得分:0)
路径应为:ENV PATH=/usr/local/texlive/bin/x86_64-linuxmusl:$PATH