-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (51 loc) · 1.64 KB
/
Dockerfile
File metadata and controls
57 lines (51 loc) · 1.64 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
48
49
50
51
52
53
54
55
56
57
FROM rocker/r2u:24.04
LABEL maintainer="Sounkou Mahamane Toure <sounkoutoure@gmail.com>"
LABEL description="Docker image for RBCFTools R package"
# Build argument to switch between release and develop mode
# Usage: docker build --build-arg BUILD_MODE=develop .
ARG BUILD_MODE=release
# Install system dependencies for RBCFTools
# GNU make, pkg-config, libcurl, libgsl, libdeflate, libbzip2, libzlib, libssl-dev (or other ssl library), liblzma-dev, libxml2-dev, git, rsync
RUN apt-get update \
&& apt-get -y upgrade \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
libboost-all-dev \
libgtest-dev \
libz-dev \
git \
locales \
cmake \
make \
wget \
liblzma-dev \
libdeflate-dev \
libbz2-dev \
libssl-dev \
libcurl4-openssl-dev \
libgsl-dev \
libxml2-dev \
curl \
rsync \
unzip \
golang \
libsuitesparse-dev \
libcholmod5 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /package
WORKDIR /package
# Copy local source (only used in develop mode)
COPY ./DESCRIPTION /package
# Install remotes
RUN R -e 'install.packages("remotes")'
# Install RBCFTools based on BUILD_MODE
RUN R -e "remotes::install_deps('.', dependencies = TRUE)"
# Run the tinytest tests to verify installation
COPY . /package
WORKDIR /package
RUN R -e 'install.packages("tinytest")'
RUN R -e 'install.packages("/package", repos = NULL)'
#RUN R -e "library('RBCFTools');tinytest::test_package('RBCFTools')"
# clean up apt cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*