Bootstrap: docker
From: ubuntu:16.04
%labels
Author thomas cokelaer
Version v1.0
%post
# Software versions
export R_VERSION=3.6.1
# Get dependencies
apt-get update
apt-get install -y --no-install-recommends locales
apt-get install -y git
# prevents warnings
export DEBIAN_FRONTEND=noninteractive
# Configure default locale
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen en_US.utf8
/usr/sbin/update-locale LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Install R
echo "deb http://cran.r-project.org/bin/linux/ubuntu xenial-cran35/" > /etc/apt/sources.list.d/r.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
apt-get update
apt-key update
apt-get install -y --no-install-recommends --allow-unauthenticated \
r-base=${R_VERSION}* \
r-base-core=${R_VERSION}* \
r-base-dev=${R_VERSION}* \
r-recommended=${R_VERSION}* \
r-base-html=${R_VERSION}* \
r-doc-html=${R_VERSION}* \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libcairo2-dev \
libxt-dev \
mkdir -p /library
echo "R_LIBS_SITE=/library:\${R_LIBS_SITE}" >> /usr/lib/R/etc/Renviron.site
# Clean up
#rm -rf /var/lib/apt/lists/*
# Install devtools
echo ' chooseCRANmirror(ind=26)' >> runme.R
echo ' install.packages("devtools")' >> runme.R
Rscript runme.R
%environment
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export PATH=$PATH:/usr/bin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.