igroffman commited on
Commit
1a187cb
·
verified ·
1 Parent(s): 032726a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -7
Dockerfile CHANGED
@@ -1,14 +1,49 @@
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/r-base:latest
2
 
3
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
4
+ libcurl4-openssl-dev \
5
+ libssl-dev \
6
+ libxml2-dev \
7
+ libfontconfig1-dev \
8
+ libfreetype6-dev \
9
+ libxrender1 \
10
+ libxext6 \
11
+ libnss3 \
12
+ libasound2 \
13
+ libatk-bridge2.0-0 \
14
+ libgtk-3-0 \
15
+ libdrm2 \
16
+ libgbm1 \
17
+ fonts-liberation \
18
+ chromium \
19
+ ca-certificates \
20
+ && rm -rf /var/lib/apt/lists/*
21
 
22
+ # Let chromote/webshot2 find Chromium
23
+ ENV CHROME_BIN=/usr/bin/chromium
24
+ ENV CHROMOTE_CHROME=/usr/bin/chromium
25
+
26
+ # Create app dir
27
+ WORKDIR /app
28
+
29
+ # Install R packages (keep this separate so it layers/caches nicely)
30
+ # Add anything else you need here
31
+ RUN install2.r --error --skipinstalled \
32
  shiny \
33
+ shinydashboard \
34
+ DT \
35
  dplyr \
36
+ shinyjs \
37
  readr \
38
+ webshot2 \
39
+ htmlwidgets \
40
+ ggplot2
41
+
42
+
43
+ COPY . /app
44
+
45
+ EXPOSE 7860
46
 
47
+ # Run the Shiny app
48
+ # This respects PORT if provided by the host, defaulting to 7860.
49
+ CMD ["R", "--quiet", "-e", "options(shiny.port=as.integer(Sys.getenv('PORT', 7860)), shiny.host='0.0.0.0'); shiny::runApp('/app')"]