The repo is adapted from Flavio Barros' excellent shiny-wordclould example
This repo contains information to setup a dockerized instance of radiant. The radiant docker image is available from Docker Hub.
- For Mac: https://docs.docker.com/docker-for-mac/
- For Windows: https://docs.docker.com/docker-for-windows/
- For Linux: https://docs.docker.com/engine/installation/
After installing Docker check that that it is running by typing docker
in a terminal.
To run and install the dockerized radiant app on your computer use:
docker run --rm -p 80:80 vnijs/radiant
The app will be avaliable at http://127.0.0.1/
Alternatively, you can clone and run dockerized radiant using the steps below:
The first step is to clone the docker-radiant repo:
git clone https://github.com/radiant-rstats/docker-radiant.git
By default, file uploads are limited to 10MB and R-code in R > Report and R > Code will not be evaluated for security reasons. If you have appropriate security in place you can change these settings by editing .Rprofile
in the docker-radiant
repo you cloned. See example changes below:
options(radiant.maxRequestSize = -1) ## no file size limit
options(radiant.report = TRUE)
Use the terminal to change the working directory to the location where you cloned the repo. Then build the docker image using:
docker build -t yourname/radiant .
If you need to update your container, e.g., to get the latest version of radiant, just rerun the command above.
Note that creating the container will take some time as it has to pull and install ubuntu, R, shiny-server, etc. as well as all required R-packages
If the build fails for some reason you can remove it using:
docker rmi yourname/radiant
To run the dockerized radiant app on your computer use:
docker run --rm -p 80:80 yourname/radiant
The app will be avaliable at http://127.0.0.1/
To run the container on another port, e.g., 3838, you can use:
docker run --rm -p 3838:80 yourname/radiant
If something went wrong you can access the container through the bash shell using:
docker run -t -i yourname/radiant /bin/bash