sugitora commited on
Commit
06d2999
·
verified ·
1 Parent(s): 3db11f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -18
Dockerfile CHANGED
@@ -1,32 +1,20 @@
1
- # latest をやめて固定(例:4.4.2。手元のRに合わせて変えてよい)
2
- FROM rocker/r-ver:4.4.2
3
 
4
  WORKDIR /code
5
 
6
- # 依存ライブラリ(leaflet/htmlwidgets周辺や curl/ssl/xml2 よく必要
7
- RUN apt-get update && apt-get install -y --no-install-recommends \
8
- libcurl4-openssl-dev \
9
- libssl-dev \
10
- libxml2-dev \
11
- libgit2-dev \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- # install2.r を使うために littler を入れる(r-ver では入っていないことがある)
15
- RUN R -q -e "install.packages('littler', repos='https://cloud.r-project.org')" \
16
- && ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
17
- && chmod +x /usr/local/bin/install2.r
18
-
19
- # Rパッケージ
20
- RUN install2.r --error \
21
  shiny \
22
  dplyr \
23
  ggplot2 \
24
  readr \
25
  ggExtra \
26
  lubridate \
27
- leaflet
 
28
 
29
  COPY . .
30
 
31
  EXPOSE 7860
32
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
1
+ FROM rocker/r2u:24.04
 
2
 
3
  WORKDIR /code
4
 
5
+ # r2u では install2.r が使える前提進める(入っていない場合でも、この段階でエラーが可視化される
6
+ RUN install2.r --error --skipinstalled --ncpus -1 \
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  shiny \
8
  dplyr \
9
  ggplot2 \
10
  readr \
11
  ggExtra \
12
  lubridate \
13
+ leaflet \
14
+ && rm -rf /tmp/downloaded_packages
15
 
16
  COPY . .
17
 
18
  EXPOSE 7860
19
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
20
+