The Docker Hub has a similar instance of Shiny-Server called Rocker, which runs on a Debian instance. However, many organizations prefer to run production servers on CentOS. This work uses CentOS 7. There is also a similar container based on CentOS 6.7, which was the inspiration for this container.
-
R
-
RStudio Server
-
Shiny-Server
-
tidyverse
-
plotly
-
DT
-
Install Docker on your system.
-
Download or clone this repository.
docker build /YOUR_PATH_TO/docker_shiny-server_centos7 --tag="shiny-server"
docker images
docker run -p 3838:3838 -p 8787:8787 -d shiny-server
-
Shiny-Server is running at localhost:3838
-
RStudio Server is running at localhost:8787
-
The username and password for RStudio Server is
rstudio
.
This is a bare-bones container, so there is a good chance you will want to do some additional configuration. The command below will start your Docker instance and dump you into the root shell.
docker run -p 3838:3838 -p 8787:8787 -it shiny-server /bin/bash
-
Arg -i tells docker to attach stdin to the container.
-
Arg -t tells docker to give us a pseudo-terminal.
-
Arg /bin/bash will run a terminal process in your container.
Maybe you need a PostgreSQL instance?
yum install postgresql-devel -y
exit
docker ps -a
The syntax is:
docker commit [CONTAINER ID] [REPOSITORY:TAG]
It should look something like this:
docker commit b59185b5ba4b docker-shiny:shiny-server-v2
docker images