You can really follow the same approach as the one used for the euler app on https://github.com/openanalytics/shinyproxy-template:
- you clone the shinyproxy-template GIT repository on your computer using e.g.
git clone https://github.com/openanalytics/shinyproxy-template
- inside the root folder of this repository, you remove the
euler folder and create a different folder e.g.
yourapp for your application
- you put the
ui.R file inside the
- next, you edit the
Dockerfile to adapt it to your situation; if your app requires special system dependencies, you adapt the part
# system library dependency for the euler app
RUN apt-get update && apt-get install -y \
- if your app requires additional R packages, you adapt the part
# install dependencies of the euler app
RUN R -e "install.packages('Rmpfr', repos='https://cloud.r-project.org/')"
- you change the folder name for copying the app onto the image
# copy the app to the image
RUN mkdir /root/yourapp
COPY euler /root/yourapp
- you change the command to launch the app
CMD ["R", "-e shiny::runApp('/root/yourapp')"]
Once you have made these edits to the Dockerfile, you can build the Docker image using a command similar to the one specified in the
README.md of the GIT repository and you can use the tag of your choice e.g.
sudo docker build -t babacardiouf/myappimage .
This is the procedure to generate a Docker image.
Regarding your question on how many applications you can put on one image: that is entirely up to you. On some deployments, we have almost all applications on one image, on other deployments there are multiple images for multiple apps. It really depends on whether you want the different apps to share a same OS, same R version etc. If you have one app on one image, there is no need to upgrade the R version, the Shiny version, the R package dependency versions etc. for that particular app if another app requires that (because the other app lives on a different image).
Regarding usage of shinyproxy-template: perfectly fine to use it and modify to your needs! That is the purpose!