Skip to content

Commit

Permalink
Add images for Rocky Linux 9, openSUSE 15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
glin committed Aug 29, 2022
1 parent bf72e92 commit 6a8fb0e
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 2 deletions.
21 changes: 21 additions & 0 deletions Dockerfile-rockylinux.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG BASE_IMAGE=rstudio/r-base
FROM ${BASE_IMAGE}:%%VARIANT%%

ARG R_VERSION=%%R_VERSION%%
ARG OS_IDENTIFIER=%%OS_IDENTIFIER%%

# Install R
RUN wget https://cdn.rstudio.com/r/${OS_IDENTIFIER}/pkgs/R-${R_VERSION}-1-1.x86_64.rpm && \
dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled crb && \
dnf -y install epel-release && \
dnf -y install ./R-${R_VERSION}-1-1.x86_64.rpm && \
ln -s /opt/R/${R_VERSION}/bin/R /usr/bin/R && \
ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/bin/Rscript && \
ln -s /opt/R/${R_VERSION}/lib/R /usr/lib/R && \
rm R-${R_VERSION}-1-1.x86_64.rpm && \
dnf -y remove epel-release && \
dnf config-manager --set-disabled crb && \
dnf clean all

CMD ["R"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BASE_IMAGE ?= rstudio/r-base
VERSIONS ?= 3.1 3.2 3.3 3.4 3.5 3.6 4.0 4.1 4.2 devel
VARIANTS ?= bionic focal jammy centos7 rockylinux8 opensuse153
VARIANTS ?= bionic focal jammy centos7 rockylinux8 rockylinux9 opensuse153 opensuse154

# PATCH_VERSIONS defines all actively maintained R patch versions.
PATCH_VERSIONS ?= 3.1.3 3.2.5 3.3.3 3.4.4 3.5.3 \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ The following distributions are supported:
| jammy | Ubuntu 22.04 |
| centos7 | CentOS 7 |
| rockylinux8 | Rocky Linux 8 |
| rockylinux9 | Rocky Linux 9 |
| opensuse153 | openSUSE 15.3 |
| opensuse154 | openSUSE 15.4 |

All minor versions of R since 3.1 are supported, on the latest patch release.

Expand Down
36 changes: 36 additions & 0 deletions base/opensuse154/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM opensuse/leap:15.4
LABEL maintainer="RStudio Docker <[email protected]>"

RUN zypper --non-interactive update
RUN zypper --non-interactive --gpg-auto-import-keys install \
fontconfig \
gzip \
sudo \
tar \
vim \
wget \
&& zypper clean --all

# Install TinyTeX
RUN wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh && \
/root/.TinyTeX/bin/*/tlmgr path remove && \
mv /root/.TinyTeX/ /opt/TinyTeX && \
/opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin && \
/opt/TinyTeX/bin/*/tlmgr path add

# Install pandoc
RUN mkdir -p /opt/pandoc && \
wget -O /opt/pandoc/pandoc.gz https://files.r-hub.io/pandoc/linux-64/pandoc.gz && \
gzip -d /opt/pandoc/pandoc.gz && \
chmod +x /opt/pandoc/pandoc && \
ln -s /opt/pandoc/pandoc /usr/bin/pandoc && \
wget -O /opt/pandoc/pandoc-citeproc.gz https://files.r-hub.io/pandoc/linux-64/pandoc-citeproc.gz && \
gzip -d /opt/pandoc/pandoc-citeproc.gz && \
chmod +x /opt/pandoc/pandoc-citeproc && \
ln -s /opt/pandoc/pandoc-citeproc /usr/bin/pandoc-citeproc

# Set default locale
ENV LANG C.UTF-8

# Set default timezone
ENV TZ UTC
36 changes: 36 additions & 0 deletions base/rockylinux9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM rockylinux:9
LABEL maintainer="RStudio Docker <[email protected]>"

RUN dnf -y update && \
dnf -y install \
fontconfig \
glibc-langpack-en \
perl-File-Find \
sudo \
vim \
wget && \
dnf clean all

# Install TinyTeX
RUN wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh && \
/root/.TinyTeX/bin/*/tlmgr path remove && \
mv /root/.TinyTeX/ /opt/TinyTeX && \
/opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin && \
/opt/TinyTeX/bin/*/tlmgr path add

# Install pandoc
RUN mkdir -p /opt/pandoc && \
wget -O /opt/pandoc/pandoc.gz https://files.r-hub.io/pandoc/linux-64/pandoc.gz && \
gzip -d /opt/pandoc/pandoc.gz && \
chmod +x /opt/pandoc/pandoc && \
ln -s /opt/pandoc/pandoc /usr/bin/pandoc && \
wget -O /opt/pandoc/pandoc-citeproc.gz https://files.r-hub.io/pandoc/linux-64/pandoc-citeproc.gz && \
gzip -d /opt/pandoc/pandoc-citeproc.gz && \
chmod +x /opt/pandoc/pandoc-citeproc && \
ln -s /opt/pandoc/pandoc-citeproc /usr/bin/pandoc-citeproc

# Set default locale
ENV LANG en_US.UTF-8

# Set default timezone
ENV TZ UTC
6 changes: 5 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ declare -A os_identifiers=(
[jammy]='ubuntu-2204'
[centos7]='centos-7'
[rockylinux8]='centos-8'
[rockylinux9]='rhel-9'
[opensuse153]='opensuse-153'
[opensuse154]='opensuse-154'
)

generated_warning() {
Expand All @@ -45,7 +47,9 @@ for version in "${!r_versions[@]}"; do
;;
centos7|rockylinux8) template='centos'
;;
opensuse153) template='opensuse'
rockylinux9) template='rockylinux'
;;
opensuse153|opensuse154) template='opensuse'
;;
esac

Expand Down

0 comments on commit 6a8fb0e

Please sign in to comment.