TimStats commited on
Commit
02332d3
·
verified ·
1 Parent(s): 7a75a3f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -10
Dockerfile CHANGED
@@ -1,14 +1,29 @@
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
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ libssl-dev \
6
+ libcurl4-openssl-dev \
7
+ libxml2-dev \
8
+ && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Install R packages
11
+ RUN R -e "install.packages(c(\
12
+ 'shiny', \
13
+ 'DT', \
14
+ 'dplyr', \
15
+ 'tidyverse', \
16
+ 'httr', \
17
+ 'bslib', \
18
+ 'rtabulator', \
19
+ 'xgboost' \
20
+ ), repos='https://cloud.r-project.org/')"
21
+
22
+ # Create a directory for the app
23
+ WORKDIR /app
24
+
25
+ # Copy the app files
26
  COPY . .
27
 
28
+ # Command to run the app
29
+ CMD ["R", "-e", "shiny::runApp('/app', host = '0.0.0.0', port = 3838)"]