r-builds/builder/Dockerfile.opensuse-42
Greg Lin 70ee9a9771 Build with an older xz on openSUSE 42
For compatibility with SLES 12 SP3+. openSUSE 42.3 uses xz 5.2.2
while SLES 12 SP3+ uses xz 5.0.5.
2019-08-14 17:53:57 -05:00

100 lines
2.4 KiB
Text

FROM opensuse/leap:42.3
ENV OS_IDENTIFIER opensuse-42
# Most of these packages, and also the configure options that follow were determined
# by reviewing "R-base.spec" from the following OpenSUSE RPM:
# https://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_Leap_42.3/src/R-base-3.5.3-103.1.src.rpm
RUN zypper --non-interactive update
RUN zypper --non-interactive --gpg-auto-import-keys -n install \
bzip2 \
cairo-devel \
curl \
fdupes \
gcc \
gcc-c++ \
gcc-fortran \
glib2-devel \
glibc-locale \
help2man \
java-1_8_0-openjdk-devel \
libX11-devel \
libXScrnSaver-devel \
libXmu-devel \
libXt-devel \
libbz2-devel \
libcurl-devel \
libicu-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
make \
pango-devel \
pcre-devel \
perl \
perl-macros \
python \
python-pip \
readline-devel \
rpm-build \
ruby \
ruby-devel \
shadow \
tcl-devel \
texinfo \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-helvetic \
texlive-inconsolata \
texlive-latex \
texlive-makeindex \
texlive-metafont \
texlive-psnfss \
texlive-tex \
texlive-times \
tk-devel \
unzip \
wget \
xdg-utils \
xorg-x11-devel \
zip \
zlib-devel \
&& zypper clean
RUN pip install awscli
RUN gem install fpm && ln -s /usr/lib64/ruby/gems/2.1.0/gems/fpm-1.11.0/bin/fpm /bin/fpm
RUN chmod 0777 /opt
# Install an older xz 5.0.5 for compatibility with SLES 12
ARG XZ_VERSION=5.0.5
ARG XZ_DOWNLOAD_SHA1=26fec2c1e409f736e77a85e4ab314dc74987def0
RUN curl -fsSL "https://sourceforge.net/projects/lzmautils/files/xz-{$XZ_VERSION}.tar.gz/download" -o xz.tar.gz \
&& echo "$XZ_DOWNLOAD_SHA1 xz.tar.gz" | sha1sum -c - \
&& CWD=`pwd` && TMP=`mktemp -d` \
&& tar -C $TMP -zxvf xz.tar.gz \
&& cd $TMP/xz* \
&& ./configure \
&& make \
&& make install \
&& cd $CWD && rm -rf $TMP && rm -rf xz.tar.gz
# SUSE 12 doesn't have texi2any, so use makeinfo.
ENV MAKEINFO=makeinfo
# Configure flags for SUSE that don't use the defaults in build.sh
ENV CONFIGURE_OPTIONS="\
--enable-R-shlib \
--with-tcltk \
--with-x \
--enable-memory-profiling \
--with-tcl-config=/usr/lib64/tclConfig.sh \
--with-tk-config=/usr/lib64/tkConfig.sh \
--enable-prebuilt-html"
COPY package.opensuse-42 /package.sh
COPY build.sh .
ENTRYPOINT ./build.sh