-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (60 loc) · 1.77 KB
/
Dockerfile
File metadata and controls
67 lines (60 loc) · 1.77 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# get shiny serves plus tidyverse packages image
FROM rocker/shiny-verse
# system libraries of general use
RUN apt-get update && apt-get install -y \
build-essential \
bwidget \
libcairo2-dev \
libcurl4-gnutls-dev \
libgdal-dev \
libgeos++-dev \
libgeos-dev \
libgsl0-dev \
libproj-dev \
libspatialite-dev \
libssh2-1-dev \
libssl-dev \
libudunits2-dev \
libxml2-dev \
libxt-dev \
netcdf-bin \
pandoc \
pandoc-citeproc \
&& rm -rf /var/lib/apt/lists/*
# install R packages required
# (change it dependeing on the packages you need)
RUN R -e "pkg <- c( \
'dplyr', \
'DT', \
'ggplot2', \
'ggtext', \
'here', \
'knitr', \
'magrittr', \
'qs', \
'rmarkdown', \
'rsconnect', \
'scales', \
'sf', \
'shiny', \
'shinydashboard', \
'shinythemes', \
'usethis'); \
install.packages(pkg, repos = \
'http://mran.revolutionanalytics.com/snapshot/2021-02-28/')"
# create folder to store data
RUN rm -rf /srv/shiny-server/*
RUN mkdir -p /srv/shiny-server/{inst/extdata,R,www}
# copy the app to the image
COPY app.R global.R /srv/shiny-server/
COPY inst/extdata/* /srv/shiny-server/inst/extdata/
COPY R/* /srv/shiny-server/R/
COPY www/google-analytics.html /srv/shiny-server/www/
COPY ABOUT.md /srv/shiny-server/
# this file needs to be executable.
COPY shiny-server.sh /usr/bin/shiny-server.sh
RUN chmod +x /usr/bin/shiny-server.sh
# select port
EXPOSE 3838
# run app
CMD ["/usr/bin/shiny-server.sh"]