Container not responding

Hello,
I’m trying to get my Shiny-app running via ShinyProxy. Running the app directly via Docker works:

sudo docker run -p 3838:3838 memyself/expapp

I can then connect to the app using the IP adress and port 3838. Whats not working is starting the app via ShinyProxy. The Docker image exposes port 3838, the command to start the app is:

CMD ["R", "-e", "shiny::runApp('/root/shinyexp/proto_23_03.R', port=3838, host='0.0.0.0')"]

The reason for this is that exposing the port and host via Rprofile does not work. I don’t know why.

My application.yml looks like this (not the complete file):

  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000
  - id: expapp
    display-name: ExpApp
    description: Application which demonstrates the basics of a Shiny app
    container-cmd: ["R", "-e", "shiny::runApp('/root/shinyexp/proto_23_03.R', port=3838, host='0.0.0.0')"]
    container-image: memyself/expapp

I don’t know whats wrong with this, but when I try to start the app via ShinyProxy, I only get an error: “Container unresponsive, trying again (14/20): http://localhost:20000
What am I missing?

1 Like

Hi @sp_noobi,

Do you have set the bind-address: 0.0.0.0 in application.yml? if you have set it to 127.0.0.1 it won’t work.
do you have a EXPOSE 3838 before the CMD line in Docker file?
EXPOSE 3838
CMD [“R”, “–no-save”, “-e”, “shiny::runApp(’~/theappfolder’,host=‘0.0.0.0’, port=3838)”]

The other possibility is that you have included the R file, although I think shiny requires only the folder and uses app.R. so probably try this in your container-cmd: [“R”, “-e”, “shiny::runApp(’/root/shinyexp’, port=3838, host=‘0.0.0.0’)”] and rename your shiny application to app.R

for the cert-path: use the output of this:docker info --format ‘{{.DockerRootDir}}’
for me in ubuntu I get something like: /var/lib/docker

I hope it helps.

Mehrdad