NCEAS / metadig-engine

MetaDig Engine: multi-dialect metadata assessment engine
7 stars 5 forks source link

Docker build errors for metadig-scorer image #307

Closed gothub closed 2 years ago

gothub commented 2 years ago

During the build of the Docker image for metadig-scorer, the following errors are generated:

ERROR: dependency ‘glue’ is not available for package ‘vctrs’
* removing ‘/usr/local/lib/R/site-library/vctrs’
ERROR: dependencies ‘cli’, ‘glue’, ‘lifecycle’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/usr/local/lib/R/site-library/pillar’
ERROR: dependencies ‘glue’, ‘vctrs’ are not available for package ‘tidyselect’
* removing ‘/usr/local/lib/R/site-library/tidyselect’
ERROR: dependencies ‘lifecycle’, ‘vctrs’ are not available for package ‘hms’
* removing ‘/usr/local/lib/R/site-library/hms’
ERROR: dependencies ‘lifecycle’, ‘pillar’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/usr/local/lib/R/site-library/tibble’
ERROR: dependency ‘hms’ is not available for package ‘progress’
* removing ‘/usr/local/lib/R/site-library/progress’
ERROR: dependencies ‘cli’, ‘glue’, ‘hms’, ‘lifecycle’, ‘vctrs’, ‘tidyselect’, ‘progress’ are not available for package ‘vroom’
* removing ‘/usr/local/lib/R/site-library/vroom’
ERROR: dependencies ‘cli’, ‘hms’, ‘lifecycle’, ‘vroom’ are not available for package ‘readr’
* removing ‘/usr/local/lib/R/site-library/readr’
Warning messages:
1: In install.packages("readr", repos = c(CRAN = "http://cran.rstudio.com")) :
  installation of package ‘cli’ had non-zero exit status
gothub commented 2 years ago

The base Docker image was changed from FROM openjdk:8-jre-alpine to FROM openjdk:8-jdk. Both of these images install an older version of Linux that supports R < 3.6.0. With the previous alpine version, the R 'reader' package had to be installed directly from CRAN, as the installed version of Linux didn't have a pre-built package for it. This caused a dependency problem with the newer version of reader and older version of R. The newer image does have a pre-built R package for reader, so all needed R packages can be installed from the Linux distribution, and not from CRAN.

The long-term fix is to upgrade metadig-engine so that it can be compiled from a newer version of OpenJDK, now called the JDK Project