当我试图通过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
没有正确安装的原因有任何想法,这将是一个巨大的帮助。
你的图片是基于rocker/tidyverse
,它本身是基于rocker/rstudio
,基于rocker/-base。
他们都没有安装ggmap。
## install R spatial packages && cleanup
RUN xvfb-run -a install.r \
geoR \
ggmap \
尝试从可以测试ggmap
存在的图像开始。