当我试图通过docker容器运行一个项目时,我得到了错误。尽管在Dockerfile中调用了ggmap,但镜像失败并显示ggmap未安装。
下面是我的存储库的链接:https://github.com/TedHaley/tree_value.git
这是我的dockerfile的样子:
FROM rocker/tidyverse
RUN Rscript -e "install.packages('devtools')"
RUN Rscript -e "install.packages('ezknitr')"
RUN Rscript -e "install.packages('lubridate')"
RUN Rscript -e "install.packages('dplyr')"
RUN Rscript -e "install.packages('readr')"
RUN Rscript -e "install.packages('ggplot2')"
RUN Rscript -e "install.packages('rgdal')"
RUN Rscript -e "install.packages('broom')"
RUN Rscript -e "install.packages('maptools')"
RUN Rscript -e "install.packages('gpclib')"
RUN Rscript -e "install.packages('packrat')"
RUN Rscript -e "install.packages('MASS')"
RUN Rscript -e "install.packages('scales')"
RUN Rscript -e "install.packages('stringr')"
RUN Rscript -e "install.packages('hexbin')"
RUN Rscript -e "install.packages('reshape2')"
RUN Rscript -e "install.packages('ggmap', repos = 'http://cran.us.r-project.org')"如果有人对为什么ggmap没有正确安装有任何想法,那将是一个巨大的帮助。
发布于 2017-12-16 05:19:19
您的图像是基于rocker/tidyverse的,它本身基于rocker/rstudio,基于rocker/-base。
它们都没有安装ggmap。
例如,参见achubaty/r-spatial-devel,它在
## install R spatial packages && cleanup
RUN xvfb-run -a install.r \
geoR \
ggmap \尝试从可以测试ggmap存在的映像开始。
https://stackoverflow.com/questions/47839907
复制相似问题