-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 841 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Example shiny app docker file
# https://blog.sellorm.com/2021/04/25/shiny-app-in-docker/
# get shiny serveR and a version of R from the rocker project
FROM rocker/shiny:4.0.5
# system libraries
# Try to only install system libraries you actually need
# Package Manager is a good resource to help discover system deps
RUN apt-get update && apt-get install -y \
libcurl4-gnutls-dev \
libssl-dev
# install R packages required
# Change the packages list to suit your needs
RUN R -e 'install.packages(c(\
"shiny", \
"shinydashboard", \
"ggplot2" \
), \
repos="https://packagemanager.rstudio.com/cran/__linux__/focal/2021-04-23"\
)'
# copy the app directory into the image
COPY ./shiny-app/* /srv/shiny-server/
# run app
CMD ["/usr/bin/shiny-server"]