Created
September 8, 2022 13:43
-
-
Save lgaborini/afc9719a5d38b19a4b5423213eafafb7 to your computer and use it in GitHub Desktop.
remotes-repos-reprex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rocker/verse:4.2.0 | |
RUN R -q -e 'install.packages("remotes")' | |
# add a new file-based remote to options()$repos | |
COPY setup_repos.R setup_repos.R | |
# add it on startup | |
RUN mkdir -p /usr/local/lib/R/etc/ /usr/lib/R/etc/ | |
RUN cat setup_repos.R | tee /usr/local/lib/R/etc/Rprofile.site | tee /usr/lib/R/etc/Rprofile.site | |
RUN R -q -e 'options()$repos' | |
RUN R -q -e 'remotes::install_git("https://github.com/hadley/stringr.git")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat("Setting custom local repos\n") | |
r <- getOption("repos") | |
r["drat"] <- "file://drat" | |
# r["drat"] <- "drat" | |
options(repos = r) | |
rm(r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment