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
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')"]