diff --git a/product/base/Dockerfile.rockylinux9 b/product/base/Dockerfile.rockylinux9 new file mode 100644 index 00000000..d0e76f0d --- /dev/null +++ b/product/base/Dockerfile.rockylinux9 @@ -0,0 +1,108 @@ +# NOTE: This Dockerfile has been provided by the community and is not officially built or supported by Posit. + +FROM rockylinux:9 +LABEL maintainer="Posit Docker " + +### ARG declarations ### +ARG R_VERSION=4.2.3 +ARG R_VERSION_ALT=4.1.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 +ARG TINI_VERSION=0.19.0 +ARG QUARTO_VERSION=1.3.340 + +### Update/upgrade system packages ### +RUN dnf install -y -q dnf-plugins-core \ + && dnf config-manager --enable crb \ + && dnf upgrade -y -q \ + && dnf install -y -q \ + epel-release \ + && dnf install -y -q \ + bzip2 \ + git \ + glibc-common \ + glibc-langpack-en \ + glibc-locale-source \ + gpgme \ + gpgmepp \ + libcurl-devel \ + libuser-devel \ + libxml2-devel \ + openssl-devel \ + openssh-clients \ + pandoc \ + perl-Digest-MD5 \ + postgresql-libs \ + rrdtool \ + sudo \ + unixODBC \ + unixODBC-devel \ + wget \ + which \ + && dnf clean all + +### Install tini ### +ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64 /tini +ADD https://cdn.rstudio.com/platform/tini/v${TINI_VERSION}/tini-amd64.asc /tini.asc +RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ + && gpg --batch --verify /tini.asc /tini \ + && chmod +x /tini \ + && ln -s /tini /usr/local/bin/tini + +### Install TinyTeX ### +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN curl -sL "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 Quarto ### +RUN curl -o quarto.tar.gz -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz \ + && mkdir -p /opt/quarto/${QUARTO_VERSION} \ + && tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 \ + && rm -f quarto.tar.gz \ + && ln -s /opt/quarto/${QUARTO_VERSION}/bin/quarto /usr/local/bin/quarto + +### Install R versions ### +RUN curl -O https://cdn.rstudio.com/r/rhel-9/pkgs/R-${R_VERSION}-1-1.x86_64.rpm \ + && curl -O https://cdn.rstudio.com/r/rhel-9/pkgs/R-${R_VERSION_ALT}-1-1.x86_64.rpm \ + && dnf install -y R-${R_VERSION}-1-1.x86_64.rpm \ + && dnf install -y R-${R_VERSION_ALT}-1-1.x86_64.rpm \ + && dnf clean all \ + && rm -rf R-${R_VERSION}-1-1.x86_64.rpm \ + && rm -rf R-${R_VERSION_ALT}-1-1.x86_64.rpm \ + && ln -s /opt/R/${R_VERSION} /opt/R/default \ + && ln -s /opt/R/default/bin/R /usr/local/bin/R \ + && ln -s /opt/R/default/bin/Rscript /usr/local/bin/Rscript + +### Install Python versions ### +RUN curl -O https://cdn.rstudio.com/python/rhel-9/pkgs/python-${PYTHON_VERSION}-1-1.x86_64.rpm \ + && curl -O https://cdn.rstudio.com/python/rhel-9/pkgs/python-${PYTHON_VERSION_ALT}-1-1.x86_64.rpm \ + && dnf install -y python-${PYTHON_VERSION}-1-1.x86_64.rpm \ + && dnf install -y python-${PYTHON_VERSION_ALT}-1-1.x86_64.rpm \ + && dnf clean all \ + && rm -rf python-${PYTHON_VERSION}-1-1.x86_64.rpm \ + && rm -rf python-${PYTHON_VERSION_ALT}-1-1.x86_64.rpm \ + && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install 'virtualenv<20' \ + && /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install 'virtualenv<20' \ + && /opt/python/${PYTHON_VERSION_ALT}/bin/python3 -m pip install --upgrade setuptools \ + && ln -s /opt/python/${PYTHON_VERSION} /opt/python/default + +### Locale configuration ### +RUN localedef -i en_US -f UTF-8 en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + + +LABEL posit.r.version="${R_VERSION}" \ + posit.r.version_alt="${R_VERSION_ALT}" \ + posit.python.version="${PYTHON_VERSION}" \ + posit.python.version_alt="${PYTHON_VERSION_ALT}" \ + posit.tini.version="${TINI_VERSION}" \ + posit.quarto.version="${QUARTO_VERSION}" \ + rstudio.pro-drivers.version="${DRIVERS_VERSION}" + +ENTRYPOINT ["/tini", "--"] diff --git a/product/base/Justfile b/product/base/Justfile index 00c60378..be666ff6 100755 --- a/product/base/Justfile +++ b/product/base/Justfile @@ -35,7 +35,7 @@ build OS=IMAGE_OS *TAGS="": fi tag_array=() - for TAG in {{TAGS}} + for TAG in $raw_tag_array do tag_array+=("-t" $TAG) done diff --git a/product/base/test/goss.yaml b/product/base/test/goss.yaml index 18e338a5..c62d04b8 100644 --- a/product/base/test/goss.yaml +++ b/product/base/test/goss.yaml @@ -7,7 +7,7 @@ package: cracklib-runtime: installed: true {{end}} - {{if .Env.OS | regexMatch "centos.*"}} + {{if .Env.OS | regexMatch "(centos|rockylinux).*"}} epel-release: installed: true gnupg2: diff --git a/product/pro/Dockerfile.rockylinux9 b/product/pro/Dockerfile.rockylinux9 new file mode 100644 index 00000000..94eb6ab9 --- /dev/null +++ b/product/pro/Dockerfile.rockylinux9 @@ -0,0 +1,30 @@ +# NOTE: This Dockerfile has been provided by the community and is not officially built or supported by Posit. + +### ARG declarations ### +ARG R_VERSION=4.2.3 +ARG R_VERSION_ALT=4.1.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 +ARG SRC_IMAGE_NAME=product-base +ARG REGISTRY=ghcr.io +FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:rockylinux9-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} +LABEL maintainer="Posit Docker " + +### ARG declarations ### +ARG R_VERSION=4.2.3 +ARG R_VERSION_ALT=4.1.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 +ARG DRIVERS_VERSION=2023.05.0-1 + +### Install professional drivers +RUN curl -O https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm \ + && dnf install -y ./rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm \ + && dnf clean all \ + && rm -f rstudio-drivers-${DRIVERS_VERSION}.el7.x86_64.rpm \ + && cp /opt/rstudio-drivers/odbcinst.ini.sample /etc/odbcinst.ini \ + && "/opt/R/${R_VERSION}/bin/R" -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/rhel9/latest")' + +LABEL rstudio.pro-drivers.version="${DRIVERS_VERSION}" + +ENTRYPOINT ["/tini", "--"] diff --git a/product/pro/Justfile b/product/pro/Justfile index cbee4b36..fb7528ce 100644 --- a/product/pro/Justfile +++ b/product/pro/Justfile @@ -37,7 +37,7 @@ build OS=IMAGE_OS *TAGS="": raw_tag_array=("{{TAGS}}") fi - if [[ "{{ OS }}" == "centos7" ]]; then + if [[ "{{ OS }}" == "centos7" ]] || [[ "{{ OS }}" == "rockylinux9" ]]; then _DRIVERS_VERSION="{{ DRIVERS_VERSION_RHEL }}" else _DRIVERS_VERSION="{{ DRIVERS_VERSION }}" diff --git a/product/pro/test/goss.yaml b/product/pro/test/goss.yaml index 53ea2a34..5b3e6e8d 100644 --- a/product/pro/test/goss.yaml +++ b/product/pro/test/goss.yaml @@ -9,7 +9,7 @@ package: unixodbc-dev: installed: true {{end}} - {{if .Env.OS | regexMatch "centos.*"}} + {{if .Env.OS | regexMatch "(centos|rockylinux9).*"}} epel-release: installed: true gnupg2: diff --git a/r-session-complete/Dockerfile.rockylinux9 b/r-session-complete/Dockerfile.rockylinux9 new file mode 100644 index 00000000..5c0e91cd --- /dev/null +++ b/r-session-complete/Dockerfile.rockylinux9 @@ -0,0 +1,52 @@ +# NOTE: This Dockerfile has been provided by the community and is not officially built or supported by Posit. + +ARG R_VERSION=4.2.3 +ARG R_VERSION_ALT=4.1.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 +ARG SRC_IMAGE_NAME=product-base-pro +ARG REGISTRY=ghcr.io +FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:rockylinux9-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} +LABEL maintainer="RStudio Docker " + +### ARG declarations ### +ARG R_VERSION=4.2.3 +ARG R_VERSION_ALT=4.1.3 +ARG PYTHON_VERSION=3.9.17 +ARG PYTHON_VERSION_ALT=3.8.17 +ARG JUPYTERLAB_VERSION=3.2.9 +ARG RSW_DOWNLOAD_URL=https://download2.rstudio.org/server/rhel9/x86_64/rstudio-workbench-rhel-2023.09.1-x86_64.rpm + +### Install RSW +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN dnf install -y subversion \ + && curl -o rstudio-workbench.rpm "${RSW_DOWNLOAD_URL}" \ + && gpg --keyserver hkps://keys.openpgp.org --recv-keys 51C0B5BB19F92D60 \ + && gpg --export --armor 51C0B5BB19F92D60 > rstudio-signing.key \ + && rpm --import rstudio-signing.key \ + && rpm -K rstudio-workbench.rpm \ + && dnf install -y rstudio-workbench.rpm \ + && rm rstudio-workbench.rpm \ + && dnf clean all \ + && rm -rf /var/lib/rstudio-server/r-versions + +### Install jupyter +RUN /opt/python/"${PYTHON_VERSION}"/bin/pip3 install \ + jupyter \ + jupyterlab=="${JUPYTERLAB_VERSION}" \ + rsconnect_jupyter \ + rsconnect_python \ + rsp_jupyter \ + workbench_jupyterlab \ + && ln -s /opt/python/"${PYTHON_VERSION}"/bin/jupyter /usr/local/bin/jupyter \ + && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter \ + && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter \ + && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension install --sys-prefix --py rsconnect_jupyter \ + && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-nbextension enable --sys-prefix --py rsconnect_jupyter \ + && /opt/python/"${PYTHON_VERSION}"/bin/jupyter-serverextension enable --sys-prefix --py rsconnect_jupyter + +ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}" + +COPY vscode.extensions.conf /etc/rstudio/vscode.extensions.conf + +EXPOSE 8788/tcp diff --git a/r-session-complete/Justfile b/r-session-complete/Justfile index 529be69f..ae9db87c 100755 --- a/r-session-complete/Justfile +++ b/r-session-complete/Justfile @@ -29,7 +29,7 @@ build OS=IMAGE_OS VERSION=RSW_VERSION *TAGS="": if [[ "{{BUILDX_PATH}}" != "" ]]; then BUILDX_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache" fi - if [[ "{{ OS }}" == "centos7" ]]; then + if [[ "{{ OS }}" == "centos7" ]] || [[ "{{ OS }}" == "rocklinux9" ]]; then _DRIVERS_VERSION="{{ DRIVERS_VERSION_RHEL }}" else _DRIVERS_VERSION="{{ DRIVERS_VERSION }}" diff --git a/r-session-complete/NEWS.md b/r-session-complete/NEWS.md index 77917139..7f574650 100644 --- a/r-session-complete/NEWS.md +++ b/r-session-complete/NEWS.md @@ -1,3 +1,7 @@ +# 2023.11.21 +- Added `Dockerfile.rockylinux9`, a community contribution! + - *NOTE: This image is not officially built or supported by Posit at this time.* + # 2023.03.1 - Update Python VSCode extension to version 2023.6.1