International Rice Research Institute commited on
Commit
c211931
·
verified ·
1 Parent(s): 8d02fef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +77 -8
Dockerfile CHANGED
@@ -1,14 +1,83 @@
1
- FROM rocker/r-base:latest
2
 
 
3
  WORKDIR /code
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  RUN install2.r --error \
6
- shiny \
7
- dplyr \
8
- ggplot2 \
9
- readr \
10
- ggExtra
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- COPY . .
13
 
14
- CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM rocker/shiny:latest
2
 
3
+ # Set working directory inside container
4
  WORKDIR /code
5
 
6
+ # Install additional system dependencies including libglpk for igraph
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 DT dependencies first
24
+ RUN install2.r --error \
25
+ htmltools \
26
+ htmlwidgets \
27
+ jsonlite \
28
+ crosstalk \
29
+ magrittr \
30
+ promises \
31
+ ellmer \
32
+ shinychat \
33
+ text2vec \
34
+ Matrix
35
+ # sparse matrices
36
+
37
+ # Install main packages, tidyverse, and igraph in a single RUN command
38
+ # Note: If --error is not supported by your install2.r, remove it and use:
39
+ # RUN install2.r nloptr lme4 emmeans readxl plotly shinyjs shinyWidgets DT RColorBrewer ggrepel openxlsx randomForest caret qtl writexl viridis devtools tidyverse igraph
40
  RUN install2.r --error \
41
+ nloptr \
42
+ lme4 \
43
+ emmeans \
44
+ readxl \
45
+ plotly \
46
+ shinyjs \
47
+ shinyWidgets \
48
+ DT \
49
+ RColorBrewer \
50
+ ggrepel \
51
+ openxlsx \
52
+ randomForest \
53
+ caret \
54
+ qtl \
55
+ writexl \
56
+ viridis \
57
+ devtools \
58
+ tidyverse \
59
+ igraph \
60
+ vcfR \
61
+ poppr \
62
+ igraph \
63
+ reshape2 \
64
+ viridis \
65
+ plotly
66
+
67
 
 
68
 
69
+ # Install packages from GitHub
70
+ RUN R -e "devtools::install_github('cran/qtlDesign')" \
71
+ && R -e "devtools::install_github('jtlovell/qtlTools')"
72
+
73
+ # Create www directory and health file
74
+ RUN mkdir -p /code/www && echo "OK" > /code/www/health
75
+
76
+ # Copy app code
77
+ COPY app.R /code/
78
+
79
+ # Expose the port Shiny will run on
80
+ EXPOSE 7860
81
+
82
+ # Run the app with corrected host address
83
+ CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=7860)"]