File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ Bootstrap: docker
2
+ FROM: debian:9.3-slim
3
+ # Debian Stretch without manpages and other files
4
+ # usually not needed in containers.
5
+
6
+ %help
7
+
8
+ Contains R version 2.15.3.
9
+
10
+ %post
11
+
12
+ # Packages needed inside the container.
13
+ export CONTAINER_SOFTWARE="gfortran g++ gcc"
14
+ ## Set build variables.
15
+ # Packages needed only for the build process.
16
+ export BUILD_SOFTWARE="wget make"
17
+ # Needed for downloading source.
18
+ export R_BASE_URI="https://cran.r-project.org/src/base/R-2/"
19
+ export R_FOLDER_NAME="R-2.15.3"
20
+ export R_PACKAGE_NAME="${R_FOLDER_NAME}.tar.gz"
21
+ # Set paths to facilitate the build process.
22
+ export BUILDHOME="/tmp"
23
+
24
+ # Install build and run requirements.
25
+ apt-get update
26
+ apt-get install $BUILD_SOFTWARE $CONTAINER_SOFTWARE -y
27
+
28
+ # Get R Package
29
+ wget ${R_BASE_URI}${R_PACKAGE_NAME}
30
+ tar -xf $R_PACKAGE_NAME
31
+
32
+ # Build R
33
+ cd $R_FOLDER_NAME
34
+ ./configure --with-readline=no --with-x=no
35
+ make
36
+ make install
37
+
38
+ # Removing installation overhead.
39
+
40
+ cd
41
+ rm -rf /tmp/*
42
+ apt-get purge $BUILD_SOFTWARE -y
43
+ apt-get autoclean -y
44
+ apt-get autoremove -y
45
+ rm -rf /var/lib/apt/lists/*
46
+
47
+ %test
48
+
49
+ # Can we call R?
50
+ R --version
You can’t perform that action at this time.
0 commit comments