How can I make a dockerized Shiny app in a flexdashboard wrapper ?

Is it possible to make a shiny app with flexdashboard as a package with the ThinkR golem package? Is it possible to dockerize it afterwards? How is the workflow going from the flexdashboard .Rmd file?

My Dockerfile so far

FROM rocker/shiny-verse:latest 

MAINTAINER Tim M.Schendzielorz "tim.schendzielorz@googlemail.com"

# Install dependencies 

RUN  echo 'install.packages(c("dplyr","dbplyr","DBI","DT","plotly","flexdashboard","lubridate"), \
        repos="http://cran.us.r-project.org", \
        dependencies=TRUE)' > /tmp/packages.R \
        && Rscript /tmp/packages.R


# Copy configuration files into the Docker image
COPY shiny-server.conf  /usr/bin/shiny-server.conf
COPY shiny-server.sh  /usr/bin/shiny-server.sh

COPY flexdashboard.Rmd /usr/bin/flexdashboard.Rmd   

# make all app files readable (solves issue when dev in Windows, but building in Ubuntu)
RUN chmod -R 755 /usr/bin

# Add shiny user
RUN groupadd  user \
&& useradd --gid user --shell /bin/bash --create-home user

EXPOSE 3838



CMD ["R", "-e rmarkdown::run('/usr/bin/flexdashboard.Rmd')"]

I am new to Docker and it seems I need to add the Command to rmarkdown::run in the apps specs as mentioned here: Deploy Shiny app with Flexdashboard and start the shiny server with the standard shell command instead? The same question is on stackoverflow, but might be deleted due to the complex question. How can I make a dockerized Shiny app in a flexdashboard wrapper with golem?

1 Like

Several issues were solved, as described here: https://support.openanalytics.eu/t/error-when-flexdashboard-rmd-is-deployed-via-shiny-proxy/1357

see also my github repo for example Dockerfiles for flexdashboard app deployment via shiny proxy:

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.