-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
35 lines (28 loc) · 1.11 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
# Full tag, so we don't accidentally go up an R version.
FROM opencpu/ubuntu-22.04:v2.2.11-2 as builder
WORKDIR /app
RUN apt-get update && apt-get -f install -y \
fonts-liberation \
git \
libcairo-dev \
libcurl4-openssl-dev \
libxml2-dev \
libharfbuzz-dev \
libfribidi-dev \
libtiff-dev \
libjpeg-dev
ADD ./inst/bash/install-package-dependencies.sh /app/inst/bash/install-package-dependencies.sh
ADD ./packrat/packrat.lock ./packrat/packrat.opts ./packrat/init.R /app/packrat/
RUN ./inst/bash/install-package-dependencies.sh
# Add packrat libs to opencpu search path
ADD ./inst/opencpu_Rprofile /etc/opencpu/Rprofile
# ADD ./inst/csp_dna.conf /etc/opencpu/server.conf.d/csp_dna.conf
RUN echo "Mutex posixsem" >> /etc/apache2/apache2.conf
RUN mkdir -p /app/cspdna.Rcheck/tests/ && ln -sf /proc/self/fd/1 /app/cspdna.Rcheck/tests/testthat.Rout
ADD ./ /app
RUN R --no-save --quiet -e 'devtools::document()'
RUN R CMD INSTALL --no-multiarch --with-keep.source /app
RUN R CMD build /app
CMD R CMD check --no-clean /app/`ls *.gz | tail -1` --no-manual --no-build-vignettes
FROM builder as debug
FROM builder as release