Hi, I use below Dockerfile to create the docker image for word-cloud shiny app. I explicitly use
packrat to make sure that package version remain same. It executes all steps without error and creates image successfully. However, when i run the docker image, it throws an error that package not found as soon as it hit the first library call. I suspect it might due to incorrect installation path. Can any tell possible issue in the Dockerfile ??
## shiny server with specific r version FROM rocker/shiny:latest ## install libcurl4 and libv8 RUN apt-get update &&\ apt-get install libcurl4-openssl-dev libv8-3.14-dev libssl-dev libxml2-dev libxslt-dev -y &&\ mkdir -p /var/lib/shiny-server/bookmarks/shiny ## Download and install library RUN R -e "install.packages(c('packrat'), dependencies = TRUE, repos='http://cran.rstudio.com/')" ## run copy the app to the image COPY shiny-wordcloud /srv/shiny-server/ # copy lock file & install deps COPY packrat/packrat.* /srv/shiny-server/shiny-wordcloud/packrat/ RUN R -e 'packrat::restore(project="/srv/shiny-server/shiny-wordcloud");' ## make all app files readable (solves issue when dev in Windows, but building in Ubuntu) RUN chmod -R 755 /srv/shiny-server/ ## make app file readable RUN chmod -R +r /srv/shiny-server/ EXPOSE 3838 CMD ["/usr/bin/shiny-server.sh"]