I am attempting to deploy a Shiny app on AWS (Ubuntu 16.04) with Docker. I have successfully launched the app with Shiny Server, but need to containerize the app for portability. So far I have a Dockerfile that looks like this:
FROM rocker/shiny:latest #adds server.R, ui.R, and source files to project directory ADD . /srv/shiny-server/app_energy #loads necessary packages RUN sudo R -e "install.packages(c('shiny', 'dplyr', 'plotly', 'magrittr', 'ggplot2', 'lubridate'...))" EXPOSE 3838 CMD ["/usr/bin/shiny-server.sh"]
To start the app I run:
docker run --rm -p 3838:3838 energy
docker run --rm -p 3838:3838 \ -v /srv/shinyapps/:/srv/shiny-server/ \ -v /srv/shinylog/:/var/log/shiny-server/ \ energy
The first gives me the old faithful:
ERROR: An error has occurred. Check your logs or contact the app author for clarification.
While the second gives me a 'page not found error.' I have not been able to successfully glean any log files.
Any thoughts or tips? All help is greatly appreciated.