Add Ubuntu 20 support

This commit is contained in:
Jonathan Curran 2020-04-23 08:40:24 -06:00
commit 833b44f315
3 changed files with 107 additions and 3 deletions

View file

@ -0,0 +1,23 @@
FROM ubuntu:focal
ENV OS_IDENTIFIER ubuntu-2004
RUN set -x \
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y libcurl4-openssl-dev libicu-dev libopenblas-base wget python3-pip ruby ruby-dev \
&& apt-get build-dep -y r-base
RUN pip3 install awscli
RUN gem install fpm
RUN chmod 0777 /opt
# Override the default pager used by R
ENV PAGER /usr/bin/pager
COPY package.ubuntu-2004 /package.sh
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -23,6 +23,17 @@ services:
image: r-builds:ubuntu-1804
volumes:
- ./integration/tmp:/tmp/output
ubuntu-2004:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.ubuntu-2004
image: r-builds:ubuntu-2004
volumes:
- ./integration/tmp:/tmp/output
debian-9:
command: ./build.sh
environment:

View file

@ -0,0 +1,53 @@
#!/bin/bash
if [[ ! -d /tmp/output/ubuntu-2004 ]]; then
mkdir -p /tmp/output/ubuntu-2004
fi
fpm \
-s dir \
-t deb \
-v 1 \
-n R-${R_VERSION} \
--vendor "RStudio Inc." \
--deb-priority "optional" \
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
--url "http://www.r-project.org/" \
--description "GNU R statistical computation and graphics system" \
--maintainer "RStudio Inc https://github.com/rstudio/r-builds" \
--license "GPL-2" \
-p /tmp/output/ubuntu-2004/ \
-d g++ \
-d gcc \
-d gfortran \
-d libbz2-1.0 \
-d libc6 \
-d libcairo2 \
-d libcurl4 \
-d libglib2.0-0 \
-d libgomp1 \
-d libicu66 \
-d libjpeg8 \
-d liblzma5 \
-d libopenblas-dev \
-d libpango-1.0-0 \
-d libpangocairo-1.0-0 \
-d libpaper-utils \
-d libpcre3 \
-d libpng16-16 \
-d libreadline8 \
-d libtcl8.6 \
-d libtiff5 \
-d libtk8.6 \
-d libx11-6 \
-d libxt6 \
-d make \
-d ucf \
-d unzip \
-d zip \
-d zlib1g \
/opt/R/${R_VERSION}
shopt -s extglob
export PKG_FILE=$(ls /tmp/output/ubuntu-2004/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)