将tinytex安装到Rstudio Docker中

问题描述 投票:0回答:1

我正在尝试对 Rstudio 容器进行 dockerize,其中四开文档将呈现为 pdf。容器中的其他所有内容都运行良好,但是,当我尝试渲染四开文档时,出现此错误:

running xelatex - 1

No TeX installation was detected.

Please run 'quarto install tinytex' to install TinyTex.
If you prefer, you may install TexLive or another TeX distribution.

这是我的 Dockerfile:

FROM rocker/tidyverse:4.3.2

RUN apt-get update -qq && apt-get -y --no-install-recommends install \
    && install2.r --error --skipmissing --deps TRUE --skipinstalled \
    tidyverse \
    car \
    corrplot \
    cowplot \
    tidymodels \
    knitr \
    kableExtra \
    testthat \
    docopt

RUN Rscript -e 'tinytex::install_tinytex()'

我曾尝试在不同场合将以下几行添加到 Dockerfile,但没有一个起作用。

RUN install2.r --error --skipmissing --deps TRUE --skipinstalled tinytex
RUN quarto install tinytex
RUN apt-get wget 
RUN wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh
docker latex rstudio quarto tinytex
1个回答
0
投票

🗎

Dockerfile

FROM rocker/tidyverse:4.3.2

RUN apt-get update -qq && apt-get -y --no-install-recommends install \
    && install2.r --error --skipmissing --deps TRUE --skipinstalled \
        tidyverse \
        car \
        corrplot \
        cowplot \
        tidymodels \
        knitr \
        kableExtra \
        testthat \
        docopt

RUN Rscript -e 'tinytex::install_tinytex()'

ENV PATH="${PATH}:/root/bin"

RUN tlmgr update --self
RUN tlmgr update --all
RUN tlmgr install \
        koma-script \
        caption \
        pgf \
        environ \
        tikzfill \
        tcolorbox \
        pdfcol

# TEST ========================================================================

COPY minimal.qmd .

CMD quarto render minimal.qmd

🗎

minimal.qmd

---
title: "Minimal Quarto Document"
format: pdf
---

# Introduction

This is a test document.

© www.soinside.com 2019 - 2024. All rights reserved.