-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
67 lines (53 loc) · 3 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM rocker/r-ver:4.3.2
LABEL maintainer="Machteld Varewyck machteld.varewyck@openanalytics.eu"
RUN apt-get update && apt-get install --no-install-recommends -y \
libgdal-dev \
libproj22 \
libgeos3.10.2 libgeos-c1v5 \
libcurl4-openssl-dev \
curl \
ca-certificates \
pandoc \
libudunits2-dev \
libmagick++-dev \
libssl-dev \
lmodern \
fonts-cantarell \
texlive-latex-extra \
texlive-xetex \
texlive-fonts-recommended \
texlive-plain-generic \
lmodern \
wget && \
wget https://downloads.vivaldi.com/stable/vivaldi-stable_6.8.3381.55-1_$(dpkg --print-architecture).deb && \
apt-get install --no-install-recommends -y ./vivaldi-stable*.deb && \
rm -rf /var/lib/apt/lists/*
# Use the remotes package instead of devtools as it is much lighter
RUN R -q -e "install.packages('remotes')"
RUN R -q -e "options(warn = 2); remotes::install_cran(c('shiny', 'sf', 'dplyr', 'plyr', 'reshape2', 'mgcv', 'stringr', 'leaflet', 'flexdashboard', 'testthat', 'shinyjs', 'data.table', 'tinytex', 'tidyr', 'arrow', 'kableExtra', 'webshot2'))"
RUN R -q -e "options(warn = 2); remotes::install_version('DT', version = '0.23', repos = 'https://cloud.r-project.org', upgrade = 'never')"
RUN R -q -e "options(warn = 2); remotes::install_version('plotly', version = '4.10.1', repos = 'https://cloud.r-project.org', upgrade = 'never')"
RUN R -q -e "options(warn = 2); remotes::install_version('rmarkdown', version = '2.18', repos = 'https://cloud.r-project.org', upgrade = 'never')"
RUN R -q -e "options(warn = 2); remotes::install_version('magick', version = '2.7.3', repos = 'https://cloud.r-project.org', upgrade = 'never')"
# NOTE: Need at least these versions of plotly, rmarkdown and magick for dashboard rmarkdown to work
RUN R -q -e "options(warn = 2); remotes::install_github(c('inbo/INBOtheme@v0.5.10', 'daattali/shinycssloaders'))"
# For the rmarkdown pdf report
RUN R -q -e "options(warn = 2); install.packages('oaStyle', repos = c(rdepot = 'https://repos.openanalytics.eu/repo/public', getOption('repos')))"
#RUN R -e "tinytex::install_tinytex()"
#ENV PATH="/root/bin:${PATH}"
## many packages needed for kableExtra background feature
#RUN R -e "tinytex::tlmgr_install(pkgs = c('fancyhdr', 'sectsty', 'titling', 'grffile', 'texlive-scripts', 'mathspec', 'multirow', 'wrapfig', 'colortbl', 'pdflscape', 'tabu', 'varwidth', 'threeparttable', 'threeparttablex', 'environ', 'trimspaces', 'ulem', 'makecell'))"
# Configure browser for using webshot2
ENV CHROMOTE_CHROME=/usr/bin/vivaldi
# Git sha
ARG GIT_SHA
ENV GIT_SHA=$GIT_SHA
# For access to S3 on UAT
RUN R -q -e "options(warn = 2); remotes::install_cran(c('config', 'aws.s3', 'aws.ec2metadata', 'aws.signature'))"
# Install the package without the source files ending up in the Docker image
COPY reporting-grofwild /tmp/package
RUN R -q -e "options(warn = 2); remotes::install_local('/tmp/package', dependencies=FALSE)"
# set host
COPY Rprofile.site /usr/local/lib/R/etc/
EXPOSE 3838
CMD ["R", "-e reportingGrofwild::runWildApp()"]