我是Docker的新手,也是TeX的用户。
我用的是一个Dockerfile
FROM shrektan/shiny
MAINTAINER Steven
RUN R -e "install.packages(c('shiny', 'googleAuthR', 'dplyr', 'googleAnalyticsR', 'knitr', 'rmarkdown', 'jsonlite', 'scales', 'ggplot2', 'reshape2', 'Cairo'), repos = 'https://cran.rstudio.com/')"
COPY app /srv/shiny-server/
EXPOSE 3838
运行一个允许用户运行/下载beamer_presentation
.pdf
报告的闪亮应用程序。
使用上面的Dockerfile,应用程序运行良好,所有功能都存在,但我发现一个错误,提示beamer.cls
没有安装(我只包含了相关的部分):
[...]
processing file: GA_report.Rmd
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
output file: GA_report.knit.md
tlmgr search --file --global '/beamer.cls'
tlmgr: Remote repository is newer than local (2017 < 2018)
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
Please see https://tug.org/texlive/upgrade.html for details.
Warning: running command ''tlmgr' search --file --global '/beamer.cls'' had
status 1
! LaTeX Error: File `beamer.cls' not found.
! Emergency stop.
<read *>
Warning: Error in : Failed to compile /tmp/RtmpmiHjqW/file185881070c.tex. See
file185881070c.log for more info.
[No stack trace available]
我在试图确定如何将beamer.cls
安装到这个码头映像中时,迷失了。
上面的停靠文件是由图像从这个Dockerfile构建的组成的,而图像文件又是从摇臂/诗句文档构建的。
在Dockerfile的顶部,作者明确表示,他们使用的是TexLive的“虚拟”版本,并建议常见问题8提供更多信息。FAQ链接提供了如何安装包而不是安装类(即beamer.cls
)的示例。
虽然我是新来的码头,但我不知道我应该如何安装beamer.cls
到我的码头形象。我觉得在我提供的错误日志中有一些非常有用的东西,但是有人能指出我遗漏了什么吗?
发布于 2018-08-09 00:33:24
原则上它应该足够添加
RUN tlmgr install beamer translator
敬你的Dockerfile
。不幸的是,这不能直接工作,因为shrektan/shiny
映像已经有几个月没有更新了,并且仍然在使用TexLive 2017 (和R3.4.4)。同时,底层的rocker/verse
iamge正在使用TL 2018和R 3.5.1。虽然可以解决办法 "TL to old“问题,但我建议要么请维护人员重新构建shrektan/shiny
,要么自己重新构建它,或者在基于rocker/verse
的Dockerfile
中包含必要的部分。
发布于 2018-09-03 08:52:59
我是“shrektan/闪亮”的作者。码头映像已存档,不再维护。映像不包括LaTeX引擎,这可能是您出现问题的原因。
无论如何,您可以尝试rocker/verse或我的新映像shrektan/rdocker4shinyserver (类似rocker/verse,但预装了更多包。https://github.com/shrektan/rdocker( Github )
这个图像包括Tinytex,它应该解决您的问题)。
https://stackoverflow.com/questions/51662430
复制相似问题