-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
109 lines (102 loc) · 4.09 KB
/
Dockerfile
File metadata and controls
109 lines (102 loc) · 4.09 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Base image https://hub.docker.com/u/rocker/
FROM rocker/shiny:latest
# system libraries of general use
## install debian packages
RUN apt-get update && \
apt-get install -y \
sudo \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libtcl \
libtk \
libfftw3-dev \
libnode-dev \
nodejs \
libwebp-dev
## Install R packages
RUN R -e \
"install.packages(c('conflicted', \
'aplpack', \
'bslib', \
'car', \
'caret', \
'colourpicker', \
'class', \
'rpart', \
'rpart.plot', \
'DescTools', \
'dplyr', \
'DT', \
'generics', \
'ggplot2', \
'plotly', \
'ggpubr', \
'ggsci', \
'e1071', \
'factoextra', \
'markdown', \
'nortest', \
'readr', \
'readxl', \
'rstatix', \
'shiny', \
'shinythemes', \
'shinyjs', \
'shinyMatrix', \
'shinyvalidate', \
'shinyWidgets', \
'tinytex', \
'writexl', \
'xtable', \
'MASS', \
'latex2exp', \
'thematic', \
'datamods', \
'magrittr', \
'ggResidpanel', \
'broom.helpers', \
'remotes', \
'ResourceSelection',\
'shinyalert', \
'shinyDarkmode', \
'shinyjs', \
'shinyMatrix', \
'shinythemes', \
'shinyvalidate', \
'shinyWidgets', \
'thematic', \
'tibble', \
'tidyr', \
'tinytex', \
'waiter', \
'writexl', \
'xtable', \
'MASS', \
'datamods', \
'ggfortify', \
'broom', \
'GGally', \
'gridExtra', \
'htmltools', \
'katex', \
'knitr', \
'moments', \
'psych', \
'forecast'), \
dependencies = TRUE); \
remotes::install_github('deepanshu88/shinyDarkmode'); \
remotes::install_github('rsquaredacademy/olsrr');"
# copy our application into the server, where 'R' is the local path to the app
# Usage: docker build --build-arg APPLICATION_DIRECTORY=<the directory of the
# cougarstats git repo> . "." in the command only indicates that the Dockerfile
# is in the current directory. If you are one directory level above the git
# repository you may write: Usage: docker build --build-arg
# APPLICATION_DIRECTORY=cougarstats -f cougarstats/Dockerfile
ARG APPLICATION_DIRECTORY=.
COPY $APPLICATION_DIRECTORY /srv/shiny-server
## Grant access to server directory
RUN sudo chown -R shiny:shiny /srv/shiny-server
EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/srv/shiny-server', host='0.0.0.0', port=3838)"]