This repository contains a very basic R-Shiny
application that use the renv
package for its dependencies and that can be run in a Docker container.
First clone this repository and move inside.
git clone https://github.com/juliendiot42/shiny-docker-renv-example.git
cd shiny-docker-renv-example
You can now create a new image names docker_renv_shiny_app
with the command:
docker build -t docker_renv_shiny_app .
You can now start the container with:
docker run --rm -p 3838:3838 docker_renv_shiny_app
Note:
- It is importat to map one of the host port to the container's port
3838
(which serve the shiny app).- After the flag
-p
the first number is the host port and the second the container port.
You can then access the app by going to http://localhost:3838.