I am trying to dockerize an Rstudio container, where a quarto document will be rendered to pdf. Everything else in the container runs fine, however, when I try to render the quarto document, I get this error:
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.
This is my 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()'
I have tried adding the following lines to the Dockerfile on separate occasions but none of them worked.
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
Dockerfileminimal.qmdOkay, so that works. But what if you want to mount a volume with the markdown file and render it from RStudio?
Update
Dockerfile.The LaTeX distribution is being installed as the
rstudiouser.Build and launch.
Navigate to http://127.0.0.1:8787/ and login with user
rstudioand passwordpassword(you can set something more secure via thePASSWORDenvironment variable). Then within RStudio go to theworkspace/directory, open the file and render.