0

I would like to run an R Shiny application via Shinyproxy locally first.

My Application is functional, after docking it, it still works with a docker command.

I created a ‘shinyproxy’ image and launched the container but I get the following error message when I click on the application name:

# Error

**Status code:**  500

**Message:**  Container did not respond in time

I suspect a problem related to the different ports … notions that I don’t master.

The dockerfile of shiny app looks like :

enter image description here

with the following Rprofile :

local({
   options(shiny.port = 3838, shiny.host = "0.0.0.0")
})

The shinyproxy application.yml looks like :

enter image description here

What I tried is the following command :

docker run -d -v /var/run/docker.sock:/var/run/docker.sock --net sp-net -p 8080:8080 shinyproxy_container

All help is welcome

Mostafa90
  • 1,674
  • 1
  • 21
  • 39
  • Not sure if it is something to do with proxy but do you need `-p 8080:3838` as you are exposing port `3838` or is it correct? – Krishna Chaurasia Feb 14 '21 at 12:19
  • Yes you right, but with this solution, I'm no more reaching `http://localhost:8080/login`. I have the following message `This site can’t be reachedThe webpage at http://localhost:8080/login might be temporarily down or it may have moved permanently to a new web address. ERR_SOCKET_NOT_CONNECTED` – Mostafa90 Feb 14 '21 at 13:20
  • I finally found my error, Thanks for help ! it was about container command, `container-cmd: ["R", "-e", "shiny::runApp('/root/app_test')"]`. But, your suggestion was right I dont know why, `-p 8080:3838` doesn't work ... maybe `container-network: sp-net` do the job ? – Mostafa90 Feb 14 '21 at 15:32
  • Cool, so what was the fix? – Krishna Chaurasia Feb 14 '21 at 16:16
  • 2
    I remplaced `container-cmd: ["R", "-e", "shinyproxy::shiny_test()"` by `container-cmd: ["R", "-e", "shiny::runApp('/root/app_test')` inattention error ^^ – Mostafa90 Feb 14 '21 at 17:40

0 Answers0