You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear All,
I am currently working on setting up a docker image based on rocker/rstudio image to run a shiny app + providing access to the raw data using RStudio. I know this goes somewhat against the docker philosophy of providing one function/container. Coming from a science background, the reason why I chose this route is for reasons of reproducibility and ease of sharing, rather than deploying something on a larger scale. If this is the wrong place to ask, please rm.
I would like to automatically start both the shiny app and RStudio in the same container bound to two different ports
This would give me direct access via Rstudio to the underlying data displayed in the Shiny app on the same dependency system as the Shiny app.
This would allow for plotting the same plots manually and adding in new data/editing old data without breaking any dependencies
This would allow me to send the same docker image to someone to use with the Shiny app without having to even see Rstudio.
If they ran into problems I could easily debug things by logging into R Studio on a different port.
If they wanted to dive deeper into the data they could do so by logging into RStudio without having to pull a different Image.
This proved to be very hard, as docker is designed to run only one process.
What already works:
Correctly building an image from the rocker/rstudio base with all required dependencies and R Packages installed and Data copied into the image
Starting either the Shiny app or Rstudio using CMD [“/init”] or CMD Rscript scrnaseqapp.R in the dockerfile before building
Starting Rstudio, logging in, and then starting starting the Shiny app by running scrnaseqapp.R manually
Connecting to either RStudio or Shiny app from a different host within the same LAN
Things I tried that didn’t work
Editing Rprofile to run the Shiny App after starting RStudio This results in RStudio never starting, as the shiny app runs in an infinite loop. RStudio can be started by restarting in save mode, works but is a hacky workaround
Running the Shiny app using the CMD Rscript scrnaseqapp.R directive in the dockerfile. This replaces the standard CMD [“/init”] directive, which starts Rstudio, so Rstudio is never actually run
Adding two CMD directives CMD Rscript scrnaseqapp.R CMD [“/init”]. Not supported by docker and only one is run
Things I haven’t tried yet
The rocker/rstudio image is managed using a service manager called S6 that would theoretically easily be able to manage this exact use case. However, the documentation on the rocker Git Hub is sparse on this topic and I could not seem to make sense of the scripts enough to modify them myself w/o any hints.
Thank's a lot for any hints,
best Niko
The text was updated successfully, but these errors were encountered:
Dear All,
I am currently working on setting up a docker image based on rocker/rstudio image to run a shiny app + providing access to the raw data using RStudio. I know this goes somewhat against the docker philosophy of providing one function/container. Coming from a science background, the reason why I chose this route is for reasons of reproducibility and ease of sharing, rather than deploying something on a larger scale. If this is the wrong place to ask, please rm.
I would like to automatically start both the shiny app and RStudio in the same container bound to two different ports
This proved to be very hard, as docker is designed to run only one process.
What already works:
Things I tried that didn’t work
Things I haven’t tried yet
Thank's a lot for any hints,
best Niko
The text was updated successfully, but these errors were encountered: