note why --no-install-recommends is important for r packages
MODIFY
repo2docker/buildpacks/_r_base.py
repo2docker/buildpacks/_r_base.py
@@ -31,6 +31,9 @@ def rstudio_base_scripts(r_version):
return [
(
"root",
+ # we should have --no-install-recommends on all our apt-get install commands,
+ # but here it's important because these recommend r-base,
+ # which will upgrade the installed version of R, undoing our pinned version
r"""
curl --silent --location --fail {rstudio_url} > /tmp/rstudio.deb && \
curl --silent --location --fail {shiny_server_url} > /tmp/shiny.deb && \

MODIFY
repo2docker/buildpacks/r.py
repo2docker/buildpacks/r.py
@@ -292,6 +292,9 @@ class RBuildPack(PythonBuildPack):
),
(
"root",
+ # we should have --no-install-recommends on all our apt-get install commands,
+ # but here it's important because it will pull in CRAN packages
+ # via r-recommends, which is only guaranteed to be compatible with the latest r-base-core
r"""
apt-get update > /dev/null && \
apt-get install --yes --no-install-recommends \

note why --no-install-recommends is important for r packages