0

I am trying to deploy an application via docker and shinyproxy. I am using the shinyproxy-template and the standard-Dockerfile that I have modified as follows:

RUN apt-get update && apt-get install -y --no-install-recommends \
    r-cran-rcpp \
    r-cran-shiny \
    r-cran-testthat

I use this approach because my virtual machine is too weak to compile RCPP upon image-building as the Dockerfile shipped in the Repo would suggest. The approach originally stems from this question and the Answer here.

However upon building the image with:

sudo docker build -t openanalytics/shinyproxy-template .

I receive an error:

Step 5/12 : RUN apt-get update && apt-get install -y
--no-install-recommends     r-cran-rcpp     r-cran-shiny     r-cran-testthat  ---> Running in 83c71b91f408 Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Hit:2 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Fetched 324 kB in 1s (441 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:  r-cran-rcpp : Depends: r-api-3.5
               Depends: r-cran-pkgkitten but it is not going to be installed  r-cran-shiny : Depends: r-api-3.5
                Depends: r-cran-httpuv (>= 1.5.2) but it is not going to be installed
                Depends: r-cran-mime (>= 0.3) but it is not going to be installed
                Depends: r-cran-jsonlite (>= 0.9.16) but it is not going to be installed
                Depends: r-cran-xtable but it is not going to be installed
                Depends: r-cran-digest but it is not going to be installed
                Depends: r-cran-htmltools (>= 0.4.0) but it is not going to be installed
                Depends: r-cran-r6 (>= 2.0) but it is not going to be installed
                Depends: r-cran-sourcetools but it is not going to be installed
                Depends: r-cran-later (>= 1.0.0) but it is not going to be installed
                Depends: r-cran-promises (>= 1.1.0) but it is not going to be installed
                Depends: r-cran-crayon but it is not going to be installed
                Depends: r-cran-rlang (>= 0.4.0) but it is not going to be installed
                Depends: r-cran-fastmap (>= 1.0.0) but it is not going to be installed  r-cran-testthat : Depends: r-api-3.5
                   Depends: r-cran-cli but it is not going to be installed
                   Depends: r-cran-crayon (>= 1.3.4) but it is not going to be installed
                   Depends: r-cran-digest but it is not going to be installed
                   Depends: r-cran-ellipsis but it is not going to be installed
                   Depends: r-cran-evaluate but it is not going to be installed
                   Depends: r-cran-magrittr but it is not going to be installed
                   Depends: r-cran-pkgload but it is not going to be installed
                   Depends: r-cran-praise but it is not going to be installed
                   Depends: r-cran-r6 (>= 2.2.0) but it is not going to be installed
                   Depends: r-cran-rlang (>= 0.4.1) but it is not going to be installed
                   Depends: r-cran-withr (>= 2.0.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends     r-cran-rcpp     r-cran-shiny    r-cran-testthat' returned a non-zero code: 100

I greatly appreciate any hint on how to debug this issue!

One quick addendum: When I run the install-command in the console it works well:

 sudo apt-get install r-cran-rcpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
r-cran-rcpp is already the newest version (1.0.3-1build1).
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Seb
  • 5,417
  • 7
  • 31
  • 50
  • 2
    You are mixing release packages (hence `r-api-3.5` denoting the in-release build) with non-release builds (wanting a newer `r-api-4` and conflicting). I have a number of Rocker containers that 'do that better' by consistently going to out of release binaries such as the Rutter PPAs. You can find many details on my blog in several posts describing 'bspm' and 'rspm'. I am a little short on time but in essence you need to 'fix' your base container by pointing to these PPAs. – Dirk Eddelbuettel Feb 17 '21 at 17:14
  • Awesome, thank you! I went to your site, ran ```docker run --rm -ti rocker/r-base``` replaced it in the Dockerfile and id did the trick! Thanks :) – Seb Feb 17 '21 at 19:26
  • 1
    Yes, I use that a lot myself. But there are also Ubuntu variants using the larger pool of over 4700 r-cran-* packages in the 'Rutter PPA'. – Dirk Eddelbuettel Feb 17 '21 at 19:29

0 Answers0