Closed mikldk closed 3 years ago
I am not sure I can help here. The r-base
container adds the standard Debian package to a standard base.
Hence as it would be on any other .deb
based system:
edd@rob:~$ docker run --rm -ti rocker/r-base bash -c 'type R'
R is /usr/bin/R
edd@rob:~$
And execution and scripts work as you would expect:
edd@rob:~$ docker run --rm -ti rocker/r-base Rscript -e '2+2'
[1] 4
edd@rob:~$
Maybe php or nginx or ... 'shrinks' the set of installed programs. I really don't know, and I am not sure we have a Rocker issue here. Maybe you can find some help over in php or nginx corners?
Unrelated to rocker, but re calling R over a web interface, have you looked at the OpenCPU project? https://www.opencpu.org/
@eddelbuettel @cboettig As always a pleasure having your advices. Thanks. I'll close this an continue my search down the suggested roads. Thanks :bow:.
Thanks for your effort. I am not sure that I ask the right place, but I wasn't sure where to ask so now I try here (and cross my fingers):
I am new in the docker world. For fun, I am trying to make a webserver (nginx + PHP) where I can call R from PHP.
I have a
docker-compose.yml
containing:And
app/public/index.php
containsAs a result I get
string(0) ""
and at the console I getIf I in
index.php
instead triesexec('ls -l /usr/bin')
I don't see R. I am not really sure how to expose R for PHP.Is this rocker related? Or do you have a suggestion for where I can ask this question?