-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (30 loc) · 951 Bytes
/
Dockerfile
File metadata and controls
44 lines (30 loc) · 951 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
FROM --platform=linux/amd64 rocker/tidyverse as base
RUN mkdir /home/rstudio/project
WORKDIR /home/rstudio/project
# build code, output directory
RUN mkdir code
RUN mkdir output
RUN mkdir data
# copy all relevant files
COPY code code
COPY data/cancer_patient_data_set_copy.csv data
COPY Makefile .
COPY Report.Rmd .
# copy only the essential renv files and not the renv library
COPY renv.lock .
COPY .Rprofile .
RUN mkdir -p renv
COPY renv/activate.R renv
COPY renv/settings.json renv
# mannully install packages
RUN install2.r --error jsonlite utf8 tidyverse vctrs fansi
RUN mkdir renv/.cache
ENV RENV_PATHS_CACHE=renv/.cache
RUN Rscript -e "renv::restore(prompt=FALSE)"
################################################
FROM --platform=linux/amd64 rocker/tidyverse
WORKDIR /home/rstudio/project
COPY --from=base /home/rstudio/project .
RUN mkdir report
RUN apt-get update && apt-get install -y pandoc
CMD make && mv Report.html report