Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Switching to rstudio package manager
Browse files Browse the repository at this point in the history
  • Loading branch information
reisner committed May 30, 2023
1 parent 9eba92a commit 41c052a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y update \
xdg-utils \
&& rm -rf /var/lib/apt/lists/*


# Freezing packages:
RUN echo "options(repos = c(REPO_NAME = 'https://mran.microsoft.com/snapshot/2022-04-22'))" >> $R_HOME/etc/Rprofile.site
ARG TARGETPLATFORM
RUN case ${TARGETPLATFORM} in \
"linux/amd64") \
echo "options(repos = c(REPO_NAME = 'https://packagemanager.rstudio.com/cran/__linux__/jammy/2022-04-22'))" >> $R_HOME/etc/Rprofile.site ;; \
"linux/arm64") \
echo "options(repos = c(REPO_NAME = 'https://packagemanager.rstudio.com/cran/2022-04-22'))" >> $R_HOME/etc/Rprofile.site ;; \
esac

RUN R -e "options(warn = 2); install.packages(c('assertthat', \
'data.table', \
Expand Down

0 comments on commit 41c052a

Please sign in to comment.