1

I installed shinyproxy using docker-compose.

When going to my shiny app, I am running into the error:

Status code: 500 Message: Failed to start container

and when checking into error message I see:

starting container process caused \"exec: \\"R\\": executable file not found in $PATH\": unknown"}

I am not sure to understand what it means. In case that helps, the last lines of my Shiny Dockerfile are:

EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/root/app')"]

and in my application.yml the container-cmd line is container-cmd: ["R", "-e", "shiny::runApp('/root/app')"]

Do you see any wrong spelling?

Also as an FYI but don't know if that's useful information, I noticed that: - There is no R folder in my folder: /usr/lib - And there is no R folder in /usr/bin/. And I don't understand why.

Thanks for your help !

EDIT1:

I just installed R and now I see R in the /usr/bin/ folder but still nothing in /usr/lib and still same error message.

EDIT2:

I don't understand one thing, I see the R packages being installed in /usr/local/lib/R BUT

enter image description here

I see nothing in this folder after docker-compose up is done:

$ cd /usr/local/lib
$ ls
$

EDIT3:

As requested, I attach below the Dockerfile for my RStudio container and the Dockerfile for Shiny container:

RStudio Dockerfile:

FROM rocker/tidyverse:3.6.1

## Create directories
RUN mkdir -p /rstudio
RUN mkdir -p /rscripts

RUN R -e "install.packages(c('rvest','shiny','DT', 'digest', 'RCurl', 'caTools', 'bitops', 'httr', 'curl', 'stringr', 'mailR', 'xlsx', 'knitr', 'kableExtra' ,'rmarkdown', 'data.table', 'RSelenium'), repos = 'http://cran.us.r-project.org')"

Shiny Dockerfile:

FROM rocker/shiny:3.5.1

RUN apt-get update && apt-get install libcurl4-openssl-dev libv8-3.14-dev -y &&\
    mkdir -p /var/lib/shiny-server/bookmarks/shiny &&\
    mkdir -p /root/app

# Download and install library
RUN R -e "install.packages(c('mailR', 'shinydashboard', 'shinyjs', 'V8', 'DT', 'shiny', 'rvest', 'dplyr', 'htmltools', 'promises', 'jsonlite', 'data.table', 'rlang', 'xml2', 'digest', 'XML','rmarkdown'))"

# copy the app to the image
COPY app /root/app
COPY Rprofile.site /usr/local/lib/R/etc

# make all app files readable (solves issue when dev in Windows, but building in Ubuntu)
RUN chmod -R 755 /root/app
RUN chmod -R 755 /usr/local/lib/R/etc

EXPOSE 3838

CMD ["R", "-e", "shiny::runApp('/root/app')"]
ML_Enthousiast
  • 1,147
  • 1
  • 15
  • 39
  • shinyproxy is only the proxying load balancer. It does not provide shiny itself. Maybe you need to install R and shiny? – Dirk Eddelbuettel Dec 27 '19 at 17:57
  • I did install shiny via docker, getting following image: `FROM rocker/shiny:3.5.1` but you're right I had not reinstall R. For that I did `sudo amazon-linux-extras install R3.4` and rebuilt the image and relaunched with `docker-compose up` but I still get the same error message. – ML_Enthousiast Dec 27 '19 at 18:25
  • Installing R on your host does not install R in your container. To be used in the container, it needs to be installed in the container; to debug what is or isn't installed, we would need to see the portions of the Dockerfile responsible for doing such installation. – Charles Duffy Dec 28 '19 at 19:10
  • I just added the 2 Dockerfiles I use (for RStudio & Shiny), I have another one for ShinyProxy that I can also share if necessary – ML_Enthousiast Dec 28 '19 at 19:34

0 Answers0