Your Shiny app on Saagie

Github projects:

Docker Hub projects:

Shiny

You may find resources about Shiny by RStudio at: http://shiny.rstudio.com/tutorial/lesson1/

Docker

You may find resources about Docker at: https://docs.docker.com/

Your Shiny app in a Docker image

Your Dockerfile should look like:

FROM saagie/shiny4saagie
# Alternatively, use saagie/shiny4saagie-supercharged with pre-installed dependencies, or build your own
# intermediate layer that suits your needs

# Install R packages required by your Shiny app
RUN R -e 'install.packages(c("DT", "magrittr"), repos="http://cloud.r-project.org")'

# Copy your Shiny app to /srv/shiny-server/myapp
COPY myapp /srv/shiny-server/myapp

# Launch Shiny Server
CMD ["/usr/bin/shiny-server.sh"]

Your Shiny app should reside in a folder named myapp (or edit the Dockerfile accordingly) alongside the Dockerfile.
(See for instance the folder structure of https://github.com/saagie/shiny4saagie-example)

You may build your Docker image:

  • either locally (requires docker-engine)
  • or on https://hub.docker.com (for now you can only pull public images from the Saagie platform): either upload your manually built Docker image, or build automatically from a Github or Bitbucket repository
  • or on an internal CI tool like https://jenkins.io/

Pull your Shiny app on the platform

  • Pull from a public Docker hub repository:

    The URL is: docker-hub-username/docker-image-name:tag-name (tag-name is optional).
    The port is: 3838

  • Pull from an internal repository:

    Example URL to pull an image built internally with Jenkins: repos:5000/shiny4saagie-example
    The port is: 3838


Warning: the URL of the Docker image must only contain <repository name> / <image_name> and not https://hub.docker.com/r/ <repository_name> / <image_name>


RStudio and Shiny are trademarks of RStudio, Inc.