robertvidigal commited on
Commit
af34e24
·
verified ·
1 Parent(s): 4326fcb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -14
Dockerfile CHANGED
@@ -1,18 +1,30 @@
1
- FROM rocker/r-base:latest
 
2
 
3
- RUN R -e "install.packages('remotes', repos='https://cloud.r-project.org')"
4
- RUN R -e "remotes::install_github('lapop-central/lapop', force=TRUE, build_vignettes=FALSE)"
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- WORKDIR /code
 
 
7
 
8
- RUN install2.r --error \
9
- shiny \
10
- dplyr \
11
- ggplot2 \
12
- readr \
13
- remotes \
14
- ggExtra
15
-
16
- COPY . .
17
 
18
- CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
 
 
1
+ FROM rocker/shiny:latest
2
+ ENV DEBIAN_FRONTEND=noninteractive
3
 
4
+ # Install system libs required to build 'systemfonts' and other R packages
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ build-essential \
7
+ pkg-config \
8
+ libfontconfig1-dev \
9
+ libfreetype6-dev \
10
+ libpng-dev \
11
+ libharfbuzz-dev \
12
+ libfribidi-dev \
13
+ libssl-dev \
14
+ libxml2-dev \
15
+ libcurl4-openssl-dev \
16
+ ca-certificates \
17
+ git \
18
+ && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Install remotes and the lapop package (and any other R deps)
21
+ RUN R -e "install.packages('remotes', repos='https://cloud.r-project.org')"
22
+ RUN R -e "remotes::install_github('lapop-central/lapop', dependencies=TRUE, build_vignettes=FALSE, upgrade='never')"
23
 
24
+ # (Optional) Install any CRAN packages you need (or let packages.R handle it)
25
+ RUN R -e "install.packages(c('shiny','dplyr','ggplot2','readr','ggExtra'), repos='https://cloud.r-project.org')"
 
 
 
 
 
 
 
26
 
27
+ COPY . /srv/shiny-server/
28
+ WORKDIR /srv/shiny-server/
29
+ EXPOSE 7860
30
+ CMD ["R", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]