-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
32 lines (25 loc) · 866 Bytes
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM rocker/r-base:4.0.2
#install ubuntu packages
RUN \
apt-get update -y && \
apt-get install -y apt-utils
RUN apt-get install libpq-dev -y
RUN apt-get install libz-dev -y
RUN apt-get install libxml2-dev -y
RUN apt-get install librsvg2-dev -y
RUN apt-get install libnode-dev -y
RUN apt-get install libcurl4-openssl-dev -y
## update system libraries
RUN apt-get update
# install pandoc
RUN wget https://github.com/jgm/pandoc/releases/download/2.11.2/pandoc-2.11.2-1-amd64.deb
RUN dpkg -i pandoc-2.11.2-1-amd64.deb
RUN rm pandoc-2.11.2-1-amd64.deb
# copy necessary files
## root folder
COPY . .
# install renv & restore packages
RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))"
RUN R -e "remotes::install_github('rstudio/[email protected]')"
RUN Rscript -e 'renv::consent(provided = TRUE)'
RUN Rscript -e 'renv::restore()'