Container did not respond in time for my own app

Hi there,
I am new to ShinyProxy and have been trying to get my app to work, but I just keep getting the “Container did not respond in time” message. I built the docker image fine, and have referenced it in the application yaml. I have run my app using sudo docker run -p 3838:3838 wp/pupilinform2 and R does not throw up any error messages, but ends with ‘Listening on’. I have also increased the container-wait-time: 60000, but the container still does not respond. Does anyone know what else I can try?


Hi @WillP,

Can you try forcing your Shiny application to run on port 3838? See an example below. You expose the container’s 3838 port with -p 3838:3838, which means your app should also use that port. It seems to be set to 3927 in your example (or maybe a random port).

  appDir = ".",
  host = '',
  port = 3838

Best regards,


1 Like

Hi Michael,
It does seem to use a random port. Where should I put that code? In the application.yml CMD line? (My docker image also has a CMD line).


I’ve added the host and port to the Dockerfile CMD line and rebuilt the image. That has done the trick! Many thanks Michael!!! Very happy indeed :slight_smile:




For the record, the example Dockerfile discussed in the Deploying Apps section of the ShinyProxy website includes the copying of an file which will achieve the same thing (and does not require you to specify this for every individual app).

This is the relevant line.

Hope this helps!


1 Like

Hi Tobias,
I did have an file containing this:
local({ options(shiny.port = 3838, = "") })

But for some reason adding the CMD line made it work, where that didn’t. Any idea why?

I copied it in the dockerfile using:
COPY /usr/lib/R/etc/


I’m suffering this exact same fate. When I pull from the shinyproxy-template the seems to copy fine, but when I make slight amends to use my own app it reverts back to the random port.

It would be great to have some guidance on this.