-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (39 loc) · 1.96 KB
/
Copy pathDockerfile
File metadata and controls
47 lines (39 loc) · 1.96 KB
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
44
45
46
47
FROM rocker/verse:latest
ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="checklist" \
org.label-schema.description="A docker image dedicated to thoroughly checking R packages and code." \
org.label-schema.license="MIT" \
org.label-schema.url="e.g. https://www.inbo.be/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/inbo/checklist" \
org.label-schema.vendor="Research Institute for Nature and Forest (INBO)" \
maintainer="Thierry Onkelinx <thierry.onkelinx@inbo.be>"
## for apt to be noninteractive
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
## Install nano
RUN apt-get update \
&& apt upgrade -y \
&& apt-get install -y --no-install-recommends \
nano \
&& apt-get clean
COPY docker/.Rprofile $R_HOME/etc/Rprofile.site
COPY docker/upgrade_texlive.sh /rocker_scripts/upgrade_texlive.sh
RUN /rocker_scripts/upgrade_texlive.sh
RUN Rscript --no-save --no-restore -e 'install.packages("pak")' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("remotes", dependencies = TRUE)' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("assertthat")' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("hunspell")' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("lintr")' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("renv")' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("showtext")' \
&& Rscript --no-save --no-restore -e 'pak::pkg_install("citeme")'
## install checklist
COPY . /checklist/
RUN Rscript --no-save --no-restore -e 'remotes::install_local("checklist", upgrade = "always", dependencies = TRUE)' \
&& Rscript --no-save --no-restore -e 'checklist:::install_dictionary(c("nl_BE", "fr_BE", "de_DE"))'
COPY docker/entrypoint_package.sh /entrypoint_package.sh
COPY docker/entrypoint_project.sh /entrypoint_project.sh
ENTRYPOINT ["/entrypoint_package.sh"]