This project is intended for system administrators who want to perform a source installation of R. It is meant for installing official releases of R source code on Debian-based Linux distributions, e.g. Ubuntu, using a docker container.
This projects requires an installation of docker and docker compose.
To install docker, follow the instructions for your platform:
- Install Docker Engine | Docker Documentation > Supported platforms
- Post-installation steps for Linux | Docker Documentation
To cover the runtime dependencies on a headless server, the latest version of
r-base-dev
(currently 4.4.2) requires the following packages:
dpkg-dev
"${CXX_STDLIB:-g++}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}"
libc6-dev
make
ca-certificates
"${COMPILER:-gcc}${COMPILER_VERSION:+-}${COMPILER_VERSION}"
gfortran
"${CXX_STDLIB}${CXX_STDLIB:+abi}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}"
libbz2-dev
'^libcurl[3|4]$'
libdeflate-dev
libicu-dev
'^libjpeg.*-turbo.*-dev$'
liblzma-dev
"${BLAS:-liblapack-dev}"
libpangocairo-1.0-0
libpaper-utils
'^libpcre[2|3]-dev$'
libpng-dev
libreadline-dev
'^libtiff[5|6]$'
pkg-config
unzip
zip
zlib1g
These packages must be available on the host. Therefore, set
BLAS
to the [LAPACK/]BLAS library set in.env
(default:liblapack-dev
which depends onlibblas-dev
).COMPILER
to the Compiler set in.env
(default:gcc
)CXX_STDLIB
to the C++ Standard Library set in.env
(default:libstdc++
)
Install the following package dependencies for r-base-dev
to gain full Tcl/Tk
and X11 capabilities at runtime:
libtcl8.6
libtk8.6
libxss1
libxt6
xauth
xdg-utils
Clone the source code of this project:
git clone https://gitlab.com/b-data/r/rsi.git
Change directory and make a copy of all sample.
files:
cd rsi
git checkout main
for file in sample.*; do cp "$file" "${file#sample.}"; done;
In .env
, set IMAGE
according to the host's Debian-based Linux distribution
(DISTRIBUTION:RELEASE
), R_VERSION
to the desired version of R
(MAJOR.MINOR.PATCH
) and PREFIX
to the location, where you want the
R programs to be installed (default: /opt/local
).
If you intend to install multiple versions of R, set SUBDIR
to automatically
create separate subdirectories for each version (e.g. /R/${R_VERSION}
).
Then, create and start container rsi using options --build
(Build images
before starting containers) and -V
(Recreate anonymous volumes instead of
retrieving data from the previous containers):
docker-compose up --build -V
Do not forget to add PREFIX[/SUBDIR]/bin
to PATH
when using a PREFIX
within /opt
.
- Bug#982069: /usr/local/lib/R owned by group staff even if /etc/staff-group-for-usr-local not present
PRs accepted. Please submit to the GitLab repository.
This project follows the Contributor Covenant Code of Conduct.
Community support: Open a new discussion here.
Commercial support: Contact b-data by email.
Copyright © 2021 b-data GmbH
Distributed under the terms of the MIT License.