r-builds/builder/Dockerfile.centos-7
sellorm 60474b593b
Enables output of Linux OS packages for CentOS 7 (#20)
* Enables output of Linux OS packages for CentOS 7

* Changed vendor to RStudio

* Added post install script to swap in openBLAS shared library

* tidied up some dependencies

* Added a post remove step to cleanup install dir

As we swap in the openBlas shared object file during installation
the RPM database knows that the RPM installation has been "interefered"
with. Because of this `yum remove` does not clean out the full directory
tree. This update therefore prunes the directory tree at
/opt/R/R_VERSION
2019-08-06 23:17:45 +01:00

76 lines
1.6 KiB
Text

FROM centos:centos7
ENV OS_IDENTIFIER centos-7
RUN yum -y update \
&& yum -y install \
autoconf \
automake \
bzip2-devel \
cairo-devel \
gcc-c++ \
gcc-gfortran \
gcc-objc \
java-1.8.0-openjdk-devel \
java-1.8.0-openjdk-headless \
libICE-devel \
libSM-devel \
libX11-devel \
libXmu-devel \
libXt-devel \
libcurl-devel \
libicu-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
libtool \
make \
ncurses-devel \
pango-devel \
pcre-devel \
pcre2-devel \
readline-devel \
rpm-build \
ruby \
ruby-devel \
tcl-devel \
tex \
texinfo-tex \
texlive-collection-latexrecommended \
tk-devel \
valgrind-devel \
which \
wget \
xz-devel \
zlib-devel \
&& yum clean all
# Install pip for python
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py
# Install AWS CLI.
RUN pip install awscli --upgrade --user && \
ln -s /root/.local/bin/aws /usr/bin/aws
RUN gem install fpm
RUN chmod 0777 /opt
# Configure flags for CentOS 7 that don't use the defaults in build.sh
ENV CONFIGURE_OPTIONS="\
--enable-R-shlib \
--with-tcltk \
--enable-memory-profiling \
--with-x \
--with-system-valgrind-headers \
--with-tcl-config=/usr/lib64/tclConfig.sh \
--with-tk-config=/usr/lib64/tkConfig.sh \
--enable-prebuilt-html"
# RHEL 7 doesn't have the inconsolata font, so override the defaults.
ENV R_RD4PDF="times,hyper"
COPY package.centos-7 /package.sh
COPY build.sh .
ENTRYPOINT ./build.sh