Hi folks,
I just recently started “playing” with shinyproxy but I’m finding it nearly impossible to create and deploy my own/custom shiny apps while running a windows 10 machine.
From the logs i pulled the following error:
Container unresponsive, trying again (10/10): http: // localhost:2000
application.yml proxy, docker and app specs is as follow :
proxy:
title: Open Analytics Shiny Proxy
logo-url:
landing-page: /
heartbeat-rate: 10000
heartbeat-timeout: 60000
port: 8080
authentication: simple
admin-groups: scientists
docker:
cert-path: /home/none
url: http:// localhost:2375
port-range-start: 20000
specs:
- id: myapp
display-name: My App
description: Application which demonstrates the basics of a Shiny app
container-cmd: [“R”, “-e”, “shiny::runApp(‘root/Myapp’)”]
container-image: myapp
access-groups: [scientists, mathematicians]
port: 9999
My dockerfile:
FROM openanalytics/r-base
LABEL maintainer “Tobias Verbeke”
system libraries of general use
RUN apt-get update && apt-get install -y
sudo
pandoc
pandoc-citeproc
libcurl4-gnutls-dev
libcairo2-dev
libxt-dev
libssl-dev
libssh2-1-dev
libssl1.0.0
system library dependency for the euler app
RUN apt-get update && apt-get install -y
libmpfr-dev
cron
nano
tdsodbc
curl
RUN curl https: //packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https: //packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update -y
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev mssql-tools
basic shiny functionality
RUN R -e “install.packages(c(‘shiny’, ‘rmarkdown’), repos=‘https ://cloud.r-project.org/’)”
install dependencies of the euler app
RUN R -e “install.packages(c(‘DBI’,‘odbc’), repos=‘https ://cloud.r-project.org/’)”
copy the app to the image
RUN mkdir /root/Myapp
COPY Myapp.R /root/Myapp
COPY Rprofile.site /usr/lib/R/etc/
EXPOSE 9999
CMD [“R”, “-e”, “shiny::runApp(’/root/Myapp’)”]
PS: I adapted this dockerfile from a much more complex version I was working on earlier, in which my r script was supposed to pull data from a sql server being hosted at the “host”, aka my windows 10 machine. For the sake of clarity just ignore that.
PS2: I intentionally exposed port 9999 just to see if it would work if I didnt use the default port…
I would appreciate if anyone here can show this newbie how to get this app running. Shinyproxy looks promising and I would love to use it in production someday :).