We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the following Dockerfile:
Dockerfile
FROM rstudio/r-base:4.0-jammy RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get install -y \ curl \ libcurl4-openssl-dev \ libgdal-dev \ && rm -rf /var/lib/apt/lists/* ARG REPO=https://cran.rstudio.com # ARG REPO=https://p3m.dev/cran/__linux__/jammy/latest RUN R -e "install.packages('shiny', repos=c(CRAN='${REPO}')); library(shiny)" RUN R -e "install.packages('remotes', repos=c(CRAN='${REPO}')); library(remotes)" RUN R -e "remotes::install_version('rgdal','1.6-7', repos=c(CRAN='${REPO}')); library(rgdal)" RUN R -e "install.packages('rsconnect', repos=c(CRAN='${REPO}')); library(rsconnect)" COPY app.R /content/app.R WORKDIR /content RUN R -e "options(repos=c(CRAN='${REPO}/',RSPM='${REPO}')); rsconnect::appDependencies()" > dependencies.txt RUN R -e "options(repos=c(CRAN='${REPO}/',RSPM='${REPO}')); rsconnect::writeManifest()"
and a very simple app.R:
app.R
library(shiny) library(rgdal) ui <- fluidPage("hello") server <- function(input, output) {} shinyApp(ui = ui, server = server)
Dependencies can be resolved from CRAN, but not from RSPM.
# succeeds docker build -t shiny-rgdal . # fails docker build --build-arg REPO=https://p3m.dev/cran/__linux__/jammy/latest -t shiny-rgdal-p3m .
The error message:
0.519 > options(repos=c(CRAN='https://p3m.dev/cran/__linux__/jammy/latest/',RSPM='https://p3m.dev/cran/__linux__/jammy/latest')); rsconnect::writeManifest() 0.647 ℹ Capturing R dependencies with renv 11.65 ✔ Found 33 dependencies 11.75 Error in `createAppManifest()`: 11.75 ! All packages must be installed from a reproducible location. 11.75 ✖ Can't re-install packages installed from source: rgdal. 11.75 ℹ See `rsconnect::appDependencies()` for more details. 11.75 Backtrace: 11.75 ▆ 11.75 1. └─rsconnect::writeManifest() 11.75 2. └─rsconnect:::createAppManifest(...) 11.75 3. └─rsconnect:::bundlePackages(...) 11.75 4. └─rsconnect:::checkBundlePackages(deps, call = error_call) 11.75 5. └─cli::cli_abort(...) 11.75 6. └─rlang::abort(...) 11.76 Execution halted
This is caused by an inability to associate the rgdal package to a repository.
rgdal
rsconnect/R/bundlePackageRenv.R
Lines 99 to 113 in 666bb37
This code handles "CRAN" differently from "RSPM". The calls to findRepoUrl() and findRepoName() both produce NA.
findRepoUrl()
findRepoName()
The text was updated successfully, but these errors were encountered:
inherit original repository
b61dcec
fixes #1110
inherit original repository (#1111)
f8059ee
aronatkins
Successfully merging a pull request may close this issue.
Given the following
Dockerfile
:and a very simple
app.R
:Dependencies can be resolved from CRAN, but not from RSPM.
The error message:
This is caused by an inability to associate the
rgdal
package to a repository.rsconnect/R/bundlePackageRenv.R
Lines 99 to 113 in 666bb37
This code handles "CRAN" differently from "RSPM". The calls to
findRepoUrl()
andfindRepoName()
both produce NA.The text was updated successfully, but these errors were encountered: