softwareDevelopment commited on
Commit
2965065
·
verified ·
1 Parent(s): aade0b3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +85 -12
Dockerfile CHANGED
@@ -1,19 +1,92 @@
1
- FROM rocker/shiny:4.3.1
2
 
3
- # Install minimal packages
4
- RUN R -e "install.packages(c('shinydashboard', 'DT', 'ggplot2', 'plotly', 'dplyr'), repos='https://cloud.r-project.org/')"
5
 
6
- # Copy app
7
- COPY app.R /srv/shiny-server/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- # Use the default config but ensure directories exist
10
- RUN mkdir -p /var/log/shiny-server && \
11
- mkdir -p /var/lib/shiny-server && \
12
- chown -R shiny:shiny /var/log/shiny-server /var/lib/shiny-server
13
 
14
- # Override config with minimal valid config
15
- RUN echo 'run_as shiny;\n\nserver {\n listen 7860;\n location / {\n app_dir /srv/shiny-server;\n log_dir /var/log/shiny-server;\n }\n}\n' > /etc/shiny-server/shiny-server.conf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  EXPOSE 7860
18
 
19
- CMD ["/usr/bin/shiny-server"]
 
 
 
1
+ FROM rocker/shiny:latest
2
 
3
+ # Set working directory inside container
4
+ WORKDIR /code
5
 
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ libcurl4-openssl-dev \
9
+ libssl-dev \
10
+ libxml2-dev \
11
+ libnlopt-dev \
12
+ libicu-dev \
13
+ libgdal-dev \
14
+ libgeos-dev \
15
+ libproj-dev \
16
+ libv8-dev \
17
+ libnode-dev \
18
+ libglpk-dev \
19
+ libglpk40 \
20
+ && apt-get clean \
21
+ && rm -rf /var/lib/apt/lists/*
22
 
23
+ # Install pak and remotes first (needed for GitHub installs)
24
+ RUN install2.r --error remotes pak
 
 
25
 
26
+ # Install htmlwidgets and related dependencies
27
+ RUN install2.r --error \
28
+ htmltools \
29
+ htmlwidgets \
30
+ jsonlite \
31
+ crosstalk \
32
+ magrittr \
33
+ promises \
34
+ ellmer \
35
+ shinychat \
36
+ text2vec \
37
+ Matrix \
38
+ shinydashboard \
39
+ circlize \
40
+ ComplexHeatmap \
41
+ RColorBrewer \
42
+ car \
43
+ mgcv \
44
+ e1071 \
45
+ KernSmooth \
46
+ splines \
47
+ foreach \
48
+ doParallel
49
+
50
+
51
 
52
+ # Install main packages
53
+ RUN install2.r --error \
54
+ nloptr \
55
+ lme4 \
56
+ emmeans \
57
+ readxl \
58
+ plotly \
59
+ shinyjs \
60
+ shinyWidgets \
61
+ DT \
62
+ RColorBrewer \
63
+ ggrepel \
64
+ openxlsx \
65
+ randomForest \
66
+ caret \
67
+ qtl \
68
+ writexl \
69
+ viridis \
70
+ devtools \
71
+ tidyverse \
72
+ igraph \
73
+ vcfR \
74
+ poppr \
75
+ reshape2
76
+
77
+ # Install packages from GitHub using pak (modern replacement for devtools::install_github)
78
+ RUN R -e "pak::pak('cran/qtlDesign')" \
79
+ && R -e "pak::pak('jtlovell/qtlTools')"
80
+
81
+ # Create www directory and health file
82
+ RUN mkdir -p /code/www && echo "OK" > /code/www/health
83
+
84
+ # Copy app code
85
+ COPY app.R /code/
86
+
87
+ # Expose the port Shiny will run on
88
  EXPOSE 7860
89
 
90
+ # Run the app
91
+ CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7860)"]
92
+