o2r-project / containerit

Package an R workspace and all dependencies as a Docker container
https://o2r.info/containerit/
GNU General Public License v3.0
290 stars 29 forks source link

dockerfile adding a make depedency on Windows vs not on OSX #173

Open MarkEdmondson1234 opened 4 years ago

MarkEdmondson1234 commented 4 years ago

The Dockerfile created from the same script looks different if built on Windows or OSX - is this expected? See https://github.com/MarkEdmondson1234/googleCloudRunner/issues/32 for background.

Dockerfile on OSX:

FROM trestletech/plumber

RUN ["install2.r", "crayon", "httpuv", "jsonlite", "later", "magrittr", "plumber", "promises", "R6", "Rcpp", "rstudioapi", "stringi"]
COPY ["./", "./"]
ENTRYPOINT ["R", "-e", "pr <- plumber::plumb(commandArgs()[4]); pr$run(host='0.0.0.0', port=as.numeric(Sys.getenv('PORT')))"]
CMD ["api.R"]

Dockerfile on Windows:

FROM trestletech/plumber
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -y update \
  && apt-get install -y make
RUN ["install2.r", "crayon", "httpuv", "jsonlite", "later", "magrittr", "plumber", "promises", "R6", "Rcpp", "rstudioapi", "stringi"]
COPY ["./", "./"]
ENTRYPOINT ["R", "-e", "pr <- plumber::plumb(commandArgs()[4]); pr$run(host='0.0.0.0', port=as.numeric(Sys.getenv('PORT')))"]
CMD ["api.R"]

Normally this wouldn't break things but it triggered another bug in trestletech/plumber where you can't use apt-get

nuest commented 4 years ago

No, that is not expected.

I'd need to dig in which of the used packages says it requires make, and on Windows. Maybe this is a problem with the sysreqs database?

nuest commented 4 years ago

@MarkEdmondson1234 Can you run the following command on Mac, please?

futile.logger::flog.threshold(futile.logger::DEBUG)
containerit:::.find_system_dependencies(c("httpuv"), platform = "linux-x86_64-debian-gcc")

Just to be sure: you want the one where make is not installed, right? What is the Dockerfile for trestletech/plumber you use?

nuest commented 4 years ago

httpuv seems to have a system dependency on GNU Make: