-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·84 lines (74 loc) · 1.6 KB
/
Dockerfile
File metadata and controls
executable file
·84 lines (74 loc) · 1.6 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
FROM rocker/shiny:4.4.2
RUN apt-get update && apt-get install -y \
--no-install-recommends \
git-core \
libssl-dev \
libcurl4-gnutls-dev \
curl \
libsodium-dev \
libxml2-dev \
libicu-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV _R_SHLIB_STRIP_=true
ENV SHINY_LOG_STDERR=1
RUN install2.r --error --skipinstalled \
shiny \
shinyjs \
shinyWidgets \
jsonlite \
ggplot2 \
htmltools \
drc \
DT \
httr \
agricolae \
broom \
readxl \
openxlsx \
purrr \
png \
RColorBrewer \
remotes \
xml2 \
xlsx \
openssl \
ggpmisc \
jose \
R6 \
cowplot \
car \
equatiomatic \
quarto \
emmeans \
callr \
permuco
# Create writable directories as root and assign them to shiny
RUN mkdir -p /home/shiny/results \
/srv/shiny-server/OpenStats \
&& chown -R shiny:shiny /home/shiny \
&& chown -R shiny:shiny /srv/shiny-server
# Copy package sources
COPY ./MTT/ /tmp/MTT
COPY ./comeln/ /tmp/comeln
COPY ./OpenStats/ /tmp/OpenStats
# Install local packages
RUN R CMD INSTALL /tmp/MTT && \
R CMD INSTALL /tmp/comeln && \
R CMD INSTALL /tmp/OpenStats && \
rm -rf /tmp/MTT /tmp/comeln /tmp/OpenStats
# Copy Shiny app entrypoint for Shiny Server
COPY ./Start_Server_App.R /srv/shiny-server/OpenStats/app.R
# Optional: custom Shiny Server config
RUN printf '%s\n' \
'run_as shiny;' \
'server {' \
' listen 3838;' \
' location / {' \
' app_dir /srv/shiny-server/OpenStats;' \
' log_dir /var/log/shiny-server;' \
' directory_index on;' \
' }' \
'}' > /etc/shiny-server/shiny-server.conf
EXPOSE 3838
CMD ["/usr/bin/shiny-server"]