我试图部署我的闪亮的应用程序在码头(使用摇滚/闪亮-韵文:3.6.3基本图像),但我面临的问题,当我尝试安装本地(非CRAN)软件包通过码头。当在RStudio中完成安装时,安装工作正常。
成功--当我尝试在RStudio中安装本地包时:
> install.packages("<FULLPATH>/customLibrary.zip", repos = NULL, type = "win.binary")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/p/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
package ‘customLibrary’ successfully unpacked and MD5 sums checkedDockerfile
FROM rocker/shiny-verse:3.6.3
RUN R -e "install.packages('<FULLPATH>/customLibrary.zip', repos = NULL, type = 'win.binary')"
RUN R -e "install.packages(c('gtable', 'data.table', 'shinydashboard', 'ggplot2'), repos='https://cran.rstudio.com', dependencies=FALSE)"
COPY . /srv/shiny-server
EXPOSE 3838失败-当我使用上述Dockerfile构建我的Docker映像时:
[+] Building 0.8s (6/8)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 465B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/rocker/shiny-verse:3.6.3 0.0s
=> CACHED [1/4] FROM docker.io/rocker/shiny-verse:3.6.3 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 517B 0.0s
=> ERROR [2/4] RUN R -e "install.packages('<FULLPATH>/customRLibrary.zip', repos = NULL, type = 'win.bin 0.7s
------
> [2/4] RUN R -e "install.packages('<FULLPATH>/customRLibrary.zip', repos = NULL, type = 'win.binary')":
#5 0.599
#5 0.599 R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
#5 0.599 Copyright (C) 2020 The R Foundation for Statistical Computing
#5 0.599 Platform: x86_64-pc-linux-gnu (64-bit)
#5 0.599
#5 0.599 R is free software and comes with ABSOLUTELY NO WARRANTY.
#5 0.599 You are welcome to redistribute it under certain conditions.
#5 0.599 Type 'license()' or 'licence()' for distribution details.
#5 0.599
#5 0.599 R is a collaborative project with many contributors.
#5 0.599 Type 'contributors()' for more information and
#5 0.599 'citation()' on how to cite R or R packages in publications.
#5 0.599
#5 0.599 Type 'demo()' for some demos, 'help()' for on-line help, or
#5 0.599 'help.start()' for an HTML browser interface to help.
#5 0.599 Type 'q()' to quit R.
#5 0.599
#5 0.723 > install.packages('<FULLPATH>/customRLibrary.zip', repos = NULL, type = 'win.binary')
#5 0.728 Installing package into ‘/usr/local/lib/R/site-library’
#5 0.728 (as ‘lib’ is unspecified)
#5 0.728 Error in install.packages("<FULLPATH>/customRLibrary.zip", :
#5 0.728 cannot install Windows binary packages on this platform
#5 0.728 Execution halted
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c R -e "install.packages('<FULLPATH>/customRLibrary.zip', repos = NULL, type = 'win.binary')"]: runc did not terminate sucessfully有人能指出我哪里出了问题吗?蒂娅。
发布于 2020-12-01 00:07:51
在开发软件包的RStudio中,安装devtools,然后运行
devtools::build(binary = FALSE)它将生成一个可以安装在任何平台上的tar.gz包。
发布于 2020-12-01 10:55:37
rocker-org/shiny dockerfile构建在Debian上。
这是一个用于Debian稳定服务器的Dockerfile。
查看GitHub和DockerHub - 这里是dockerfile。
这意味着对OP的注释是正确的。您正试图在linux上安装windows二进制文件,但它不起作用。因此,你的问题就在这里。
install.packages("<FULLPATH>/customLibrary.zip", repos = NULL, type = "win.binary")我猜解决方案是为linux编译customLibrary,只需
install.packages("<FULLPATH>/customLibrary.zip", repos = NULL)https://stackoverflow.com/questions/65031741
复制相似问题