Rocker Project
  • Home
  • Code of Conduct
  • Images
    • The Rocker Images

    • versioned stack
    • r-ver
    • rstudio, tidyverse, verse, geospatial
    • binder
    • shiny, shiny-verse
    • cuda, ml, ml-verse

    • base stack
    • r-base
    • rocker/r-base
    • r-devel, drd, drp, r-devel-san, r-devel-ubsan-clang

    • Additional images
    • r-ubuntu
    • r-bspm
    • r2u

    • Dev Container
    • Features
    • Images
    • Templates

    • Other projects
    • External images and tools for R
  • Use
    • Extending images
    • GUI
    • Edit in containers
    • Networking
    • Shared Volumes
    • Running without root privileges using Podman
    • Reproducibility
    • Singularity
  1. versioned stack
  2. shiny, shiny-verse
  1. versioned stack
  2. shiny, shiny-verse

shiny, shiny-verse

  • The Rocker Images
  • versioned stack
    • r-ver
    • rstudio, tidyverse, verse, geospatial
    • binder
    • shiny, shiny-verse
    • cuda, ml, ml-verse
  • base stack
    • r-base
    • rocker/r-base
    • r-devel, drd, drp, r-devel-san, r-devel-ubsan-clang
  • Additional images
    • r-ubuntu
    • r-bspm
    • r2u

  • Dev Container
    • Features
    • Images
    • Templates

  • Other projects
    • External images and tools for R

On this page

  • 1 Quick reference
  • 2 Overview
  • 3 How to use
    • 3.1 Environment variables
      • 3.1.1 APPLICATION_LOGS_TO_STDOUT
    • 3.2 Run by non-root user
    • 3.3 See also
  • View source
  • Edit this page

1 Quick reference

  • Source repository: rocker-org/rocker-versioned2
  • Dockerfile
    • rocker/shiny
    • rocker/shiny-verse
  • tags
    • rocker/shiny
      • DockerHub
      • GitHub Container Registry
    • rocker/shiny-verse
      • DockerHub
      • GitHub Container Registry
  • Published image details: rocker-org/rocker-versioned2’s wiki
  • Non-root default user: not exist

2 Overview

These images are based on rocker/r-ver, and Shiny Server and some R packages for Shiny Server are already installed.

The basic usage of these images is the same, with the difference being the amount of additional (R) packages installed. (See image details for lists of installation packages)

  • rocker/shiny-verse has already installed many R packages and their dependencies apt packages. e.g. the tidyverse package, the devtools package, some R Database Interface packages, the data.table package, the fst package, and the Apache Arrow R package.

Since the Shiny Server port is set to 3838, you can open the Shiny screen on localhost:3838 from your browser with the following command.

docker run --rm -ti -p 3838:3838 rocker/shiny
Note

This document is for R 4.0.0 >= images. For R <= 3.6 images, please check the rocker-org/shiny repository.

3 How to use

3.1 Environment variables

Several special environment variables can be set to modify Shiny Server’s behavior.

3.1.1 APPLICATION_LOGS_TO_STDOUT

The Shiny Server log and all application logs are written to stdout and can be viewed using the docker logs command.

The logs for individual apps are still kept in the /var/log/shiny-server directory1. If you want to avoid printing the logs to stdout, set the environment variable APPLICATION_LOGS_TO_STDOUT to false.

docker run --rm -ti -e APPLICATION_LOGS_TO_STDOUT=false -p 3838:3838 rocker/shiny

3.2 Run by non-root user

Shiny Server is normally run by the root user, and sessions within the Shiny Server use the non-root user named shiny.

By setting the --user option as follows, Shiny Server can be run by the shiny user.

docker run --rm -ti --user shiny -p 3838:3838 rocker/shiny

3.3 See also

  • Shared Volumes
  • Networking

Footnotes

  1. Shiny Server Administrator’s Guide↩︎

 

CC-BY
  • View source
  • Edit this page