-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
61 lines (55 loc) · 2.41 KB
/
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
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
# get shiny serves plus tidyverse packages image
FROM rocker/shiny-verse:3.6.3
# system libraries of general use
RUN sudo apt-get --allow-releaseinfo-change update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libssh2-1-dev \
libudunits2-dev \
gdal-bin \
proj-bin \
libgdal-dev \
libproj-dev
# install R packages required
RUN R -e "install.packages('shiny', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('tidyverse', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('argonR', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('argonDash', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('shinycssloaders', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('shinyWidgets', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('glue', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('DT', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('rgdal', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('cleangeo', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('leaflet', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('highcharter', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('tmap', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('htmltools', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('spdep', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('spatialreg', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('reshape2', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('plm', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('splm', repos='http://cran.rstudio.com/')"
RUN R -e "install.packages('statquotes', repos='http://cran.rstudio.com/')"
RUN R -e "devtools::install_github('gpiras/sphet')"
# copy the app to the image
COPY tobler_app.Rproj /srv/shiny-server/
COPY app.R /srv/shiny-server/
COPY footer.R /srv/shiny-server/
COPY header.R /srv/shiny-server/
COPY sidebar.R /srv/shiny-server/
COPY LICENSE /srv/shiny-server/
COPY modules/* /srv/shiny-server/modules/
COPY reports_rmd/* /srv/shiny-server/reports_rmd/
COPY www/* /srv/shiny-server/www/
# select port
EXPOSE 3838
# allow permission
RUN sudo chown -R shiny:shiny /srv/shiny-server
# run app
CMD ["/usr/bin/shiny-server"]