Skip to content

Commit ad0034c

Browse files
committed
note why --no-install-recommends is important for r packages
1 parent 19acf46 commit ad0034c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

repo2docker/buildpacks/_r_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ def rstudio_base_scripts(r_version):
3131
return [
3232
(
3333
"root",
34+
# we should have --no-install-recommends on all our apt-get install commands,
35+
# but here it's important because these recommend r-base,
36+
# which will upgrade the installed version of R, undoing our pinned version
3437
r"""
3538
curl --silent --location --fail {rstudio_url} > /tmp/rstudio.deb && \
3639
curl --silent --location --fail {shiny_server_url} > /tmp/shiny.deb && \

repo2docker/buildpacks/r.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ def get_build_scripts(self):
292292
),
293293
(
294294
"root",
295+
# we should have --no-install-recommends on all our apt-get install commands,
296+
# but here it's important because it will pull in CRAN packages
297+
# via r-recommends, which is only guaranteed to be compatible with the latest r-base-core
295298
r"""
296299
apt-get update > /dev/null && \
297300
apt-get install --yes --no-install-recommends \

0 commit comments

Comments
 (0)