1 Quick reference
- Source repository: rocker-org/rocker-versioned2
- Dockerfile
- tags
- rocker/shiny
- rocker/shiny-verse
- 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. thetidyverse
package, thedevtools
package, some R Database Interface packages, thedata.table
package, thefst
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
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 with UID 999 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