spotfiresoftware / spotfire-cloud-deployment-kit

Vanilla recipes to build container images and Helm charts for Spotfire®
Apache License 2.0
16 stars 15 forks source link

v2.3.0 fails on spotfire-rservice container build because R 4.3 is not available from the repo (workaround) #22

Closed gmace-tibco closed 3 months ago

gmace-tibco commented 4 months ago

The docker build fails for the spotfire-rservice because R 4.3 is not available from the repository. R 4.4 is available but is not yet supported for this version of Spotfire. The error shows as this:

Package r-base-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Version '4.3.*' for 'r-base-core' was not found
E: Version '4.3.*' for 'r-base-dev' was not found
E: Version '4.3.*' for 'r-recommended' was not found

There is a workaround by editing the containers/images/spotfire-rservice/Dockerfile so that the default version of R is installed instead of version 4.3. The Dockerfile should be edited, reflected by this diff:

diff --git a/containers/images/spotfire-rservice/Dockerfile b/containers/images/spotfire-rservice/Dockerfile
index 806f994a..c267ae9f 100755
--- a/containers/images/spotfire-rservice/Dockerfile
+++ b/containers/images/spotfire-rservice/Dockerfile
@@ -48,20 +48,7 @@ ARG DEBIAN_FRONTEND=noninteractive  \
     R_APT_VERSION=4.3.* \
     R_APT_SUITE=bookworm-cran40/

-RUN apt update \
-    && apt install -y  \
-       ca-certificates \
-       gnupg \
-    && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7' \
-    && gpg --armor --export '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7' | tee /etc/apt/trusted.gpg.d/cran_debian_key.asc \
-    && echo deb https://cloud.r-project.org/bin/linux/debian "${R_APT_SUITE}" > /etc/apt/sources.list.d/r-project.list \
-    && apt update -y \
-    && apt install -y --no-install-recommends \
-        "r-base-core=${R_APT_VERSION}" \
-        "r-base-dev=${R_APT_VERSION}" \
-        "r-recommended=${R_APT_VERSION}" \
-    && apt clean all \
-    && R --quiet -e 'R.version'
+RUN apt update && apt install -y r-base-core r-base-dev r-recommended && apt clean all

This will result in version R 4.2 being used.

gmace-tibco commented 3 months ago

This issue has been resolved in release: v2.4.0