at my first steps with Docker I followed tutorial instructions of running an R Shiny App via a Docker container. Building the repository via Docker Hub, creating the image with Docker Toolbox and pushing/pulling it worked.
As recommended I used a reference to the Rocker/Shiny repository, so the code in my image looks like below.
By addressing port 3838 and the ‘/App’ directory the web browser only shows the index of the selected path.
So the container is running, but does not start the app in the Shiny environment.
How can I run the app within the container?
Probably it’s mainly a comprehension issue, but several tries and hours of research always led me to this very same point. Therefore, I’m glad for every hint or further explanation.
#get shiny serves plus tidyverse packages image
#system libraries of general use
RUN apt-get update && apt-get install -y
#Install R packages that are required
RUN R -e “install.packages(c(‘shinydashboard’,‘shiny’, ‘plotly’, ‘dplyr’, ‘magrittr’))”
#Heatmap related packages
RUN R -e “install.packages(‘gpclib’, type=‘source’)”
RUN R -e “install.packages(‘rgeos’, type=‘source’)”
RUN R -e “install.packages(‘rgdal’, type=‘source’)”
#copy app to image
COPY ./App /srv/shiny-server/App
#When run image and create a container, this container will listen on port 3838
RUN sudo chown -R shiny:shiny /srv/shiny-server