TimStats commited on
Commit
660cbe7
·
verified ·
1 Parent(s): 6c882b9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -4
Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM rocker/r-base:latest
2
 
3
  WORKDIR /code
4
 
5
- # Install system dependencies for magick and curl
6
  RUN apt-get update && apt-get install -y \
7
  libmagick++-dev \
8
  imagemagick \
@@ -12,9 +12,15 @@ RUN apt-get update && apt-get install -y \
12
  libfreetype6-dev \
13
  libharfbuzz-dev \
14
  libfribidi-dev \
 
 
 
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Install R packages from CRAN - added httr
 
 
 
18
  RUN install2.r --error \
19
  remotes \
20
  curl \
@@ -31,13 +37,15 @@ RUN install2.r --error \
31
  jsonlite \
32
  arrow
33
 
34
- # Install magick separately to better handle any errors
35
  RUN R -e 'install.packages("magick", repos="https://cloud.r-project.org")'
36
 
37
- # Install showtext from GitHub after other dependencies are in place
38
  RUN R -e 'remotes::install_github("yixuan/showtext")'
39
 
 
40
  RUN apt-get update && apt-get install -y fonts-roboto
 
41
  COPY . .
42
 
43
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
2
 
3
  WORKDIR /code
4
 
5
+ # Install system dependencies for httpuv, magick, curl and other packages
6
  RUN apt-get update && apt-get install -y \
7
  libmagick++-dev \
8
  imagemagick \
 
12
  libfreetype6-dev \
13
  libharfbuzz-dev \
14
  libfribidi-dev \
15
+ libxml2-dev \
16
+ libcairo2-dev \
17
+ libxt-dev \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # First install httpuv explicitly before shiny
21
+ RUN R -e 'install.packages("httpuv", repos="https://cloud.r-project.org")'
22
+
23
+ # Install R packages from CRAN
24
  RUN install2.r --error \
25
  remotes \
26
  curl \
 
37
  jsonlite \
38
  arrow
39
 
40
+ # Install magick separately
41
  RUN R -e 'install.packages("magick", repos="https://cloud.r-project.org")'
42
 
43
+ # Install showtext from GitHub
44
  RUN R -e 'remotes::install_github("yixuan/showtext")'
45
 
46
+ # Install fonts
47
  RUN apt-get update && apt-get install -y fonts-roboto
48
+
49
  COPY . .
50
 
51
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]