-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow repo specification in dockerfile() #150
Comments
Current hacky workaround: repo <- 'https://cran.rstudio.com/'
pkgs <- paste(setdiff(names(sessionInfo()$otherPkgs), 'containerit'),
collapse = ' ')
my_run_pkg <- Run("install2.r", glue::glue('-r {repo} {pkgs}'))
my_dockerfile <- dockerfile(
from = NULL,
image = "trestletech/plumber"
)
addInstruction(my_dockerfile) <- list(my_run_pkg)
print(my_dockerfile)
#> FROM trestletech/plumber
#> LABEL maintainer="leungi"
#> RUN ["install2.r", "-r https://cran.rstudio.com/ sp randomForest"] |
Hihi @leungi - thank you for the suggestion. Sometimes CRAN mirrors can be a bit out of sync, so in your case the package Anyway, I agree being able to define the used repo is a useful feature to expose to the user, I've added it to the next tasks. |
I just tested again, and confirmed that both CRAN and cloud-r contains the same source code However, I still get the same error message as above when specifying the latter as repo to download libraries. I checked for firewall issue, but not the case, since I'm able to download via http. Were you able to replicate? |
Reproducible example below.
Proposal:
dockerfile(repo = "https://cloud.r-project.org", ...)
, and then insertrepo
intoRUN ["install2.r", repo, "randomForest"]
.The text was updated successfully, but these errors were encountered: