containerit icon indicating copy to clipboard operation
containerit copied to clipboard

dockerfile adding a make depedency on Windows vs not on OSX

Open MarkEdmondson1234 opened this issue 4 years ago • 3 comments

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

MarkEdmondson1234 avatar Jan 07 '20 09:01 MarkEdmondson1234

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 avatar Jan 13 '20 16:01 nuest

@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 avatar Jan 13 '20 16:01 nuest

httpuv seems to have a system dependency on GNU Make:

  • https://cran.r-project.org/web/packages/httpuv/index.html
  • https://github.com/r-hub/sysreqsdb/blob/master/sysreqs/gnumake.json

nuest avatar Jan 13 '20 16:01 nuest