Wikki13 commited on
Commit
636172d
·
verified ·
1 Parent(s): 457e419

Update Dockerfile

Browse files

Added install2.r is used to install R packages, ensuring dependencies like rmarkdown and knitr are available for rendering reports.
Pandoc and its citation processor (pandoc-citeproc) are installed via apt-get, which is appropriate for system utilities.

Files changed (1) hide show
  1. Dockerfile +20 -4
Dockerfile CHANGED
@@ -1,16 +1,32 @@
 
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
- pandoc \
12
- pandoc-citeproc
13
-
 
14
  COPY . .
15
 
16
- CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
 
1
+ # Start with the base R image
2
  FROM rocker/r-base:latest
3
 
4
+ # Set working directory
5
  WORKDIR /code
6
 
7
+ # Install system dependencies, including Pandoc and TinyTeX
8
+ RUN apt-get update && apt-get install -y \
9
+ pandoc \
10
+ pandoc-citeproc \
11
+ wget \
12
+ && apt-get clean
13
+
14
+ # Install TinyTeX for LaTeX support
15
+ RUN R -e "install.packages('tinytex'); tinytex::install_tinytex()"
16
+
17
+ # Install required R packages
18
  RUN install2.r --error \
19
  shiny \
20
  dplyr \
21
  ggplot2 \
22
  readr \
23
  ggExtra \
24
+ rmarkdown \
25
+ knitr
26
+
27
+ # Copy application code
28
  COPY . .
29
 
30
+ # Set the command to run the Shiny app
31
+ CMD ["R", "--quiet", "-e", "shiny::runApp('.', host='0.0.0.0', port=7860)"]
32
+