@@ -14,19 +14,11 @@ RUN useradd -s /bin/bash -m docker \
1414 && usermod -a -G staff docker \
1515# # Refresh apt, install minimal tools
1616 && apt update \
17- && apt upgrade -y \
18- && apt install -y --no-install-recommends \
19- ca-certificates \
20- locales \
21- wget \
17+ && apt upgrade --yes \
18+ && apt install --yes --no-install-recommends \
19+ ca-certificates \
20+ locales \
2221# # Install key and setup R repo at CRAN
23- && wget -q -O - https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \
24- | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \
25- && echo " deb [signed-by=/etc/apt/trusted.gpg.d/cran_ubuntu_key.asc] https://cloud.r-project.org/bin/linux/ubuntu noble-cran40/" \
26- > /etc/apt/sources.list.d/cran.list \
27- # # Install key and setup r2u repo, also set 'pin preference'
28- && wget -q -O - https://r2u.stat.illinois.edu/ubuntu/dirk_eddelbuettel_pubkey.asc \
29- | tee -a /etc/apt/trusted.gpg.d/dirk_eddelbuettel_pubkey.asc \
3022 && echo " Package: *" > /etc/apt/preferences.d/99r2u \
3123 && echo " Pin: release o=CRAN-Apt Project" >> /etc/apt/preferences.d/99r2u \
3224 && echo " Pin: release l=CRAN-Apt Packages" >> /etc/apt/preferences.d/99r2u \
@@ -37,7 +29,13 @@ RUN useradd -s /bin/bash -m docker \
3729 && /usr/sbin/update-locale LANG=en_US.UTF-8
3830
3931# # New format *.sources instead of shorter *.list
32+ # # Canonical sources for the key files are
33+ # # https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc
34+ # # https://r2u.stat.illinois.edu/ubuntu/dirk_eddelbuettel_pubkey.asc
4035COPY r2u.sources /etc/apt/sources.list.d/
36+ COPY dirk_eddelbuettel_pubkey.asc /etc/apt/trusted.gpg.d/
37+ COPY cran.sources /etc/apt/sources.list.d/
38+ COPY marutter_pubkey.asc /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
4139
4240# # Set some variables
4341ENV LC_ALL=en_US.UTF-8
@@ -49,7 +47,8 @@ ENV TZ=UTC
4947# Now install R and littler, and create a link for littler in /usr/local/bin
5048# Default CRAN repo is now set by R itself, and littler knows about it too
5149RUN apt update \
52- && apt install -y --no-install-recommends \
50+ && apt upgrade --yes \
51+ && apt install --yes --no-install-recommends \
5352 r-base \
5453 r-base-dev \
5554 r-recommended \
@@ -84,5 +83,7 @@ RUN apt update \
8483 && echo " options(bspm.version.check=FALSE)" >> /etc/R/Rprofile.site \
8584 && echo " suppressMessages(bspm::enable())" >> /etc/R/Rprofile.site \
8685 && echo ' APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/90local-no-recommends \
86+ && apt update \
87+ && apt upgrade --yes \
8788 && rm -rf /tmp/downloaded_packages/ /tmp/* .rds \
8889 && rm -rf /var/lib/apt/lists/*
0 commit comments