Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

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

$
0
0

Is it possible to make a shiny app with flexdashboard as a package with the Open Analytics 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? Thank you Vincent for docktorrent, will try it now!


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>